gpt4 book ai didi

kubernetes - 无法在kubernetes的部署中删除复制 Controller 管理器

转载 作者:行者123 更新时间:2023-12-02 11:41:37 25 4
gpt4 key购买 nike

我有一个问题。我删除了复制 Controller 的pod,现在我想重新创建它。我试过了:

kubectl create -f kube-controller-manager.yaml
Error from server: error when creating "kube-controller-manager.yaml": deployments.extensions "kube-controller-manager" already exists

因此想出:
kubectl delete deployment kube-controller-manager --namespace=kube-system -v=8

哪个圈子会给出此响应一段时间:
GET https://k8s-k8s.westfield.io:443/apis/extensions/v1beta1/namespaces/kube-system/deployments/kube-controller-manager
I0112 17:33:53.334288 44607 round_trippers.go:303] Request Headers:
I0112 17:33:53.334301 44607 round_trippers.go:306] Accept: application/json, */*
I0112 17:33:53.334310 44607 round_trippers.go:306] User-Agent: kubectl/v1.4.7 (darwin/amd64) kubernetes/92b4f97
I0112 17:33:53.369422 44607 round_trippers.go:321] Response Status: 200 OK in 35 milliseconds
I0112 17:33:53.369445 44607 round_trippers.go:324] Response Headers:
I0112 17:33:53.369450 44607 round_trippers.go:327] Content-Type: application/json
I0112 17:33:53.369454 44607 round_trippers.go:327] Date: Fri, 13 Jan 2017 01:33:53 GMT
I0112 17:33:53.369457 44607 round_trippers.go:327] Content-Length: 1688
I0112 17:33:53.369518 44607 request.go:908] Response Body: {"kind":"Deployment","apiVersion":"extensions/v1beta1","metadata":{"name":"kube-controller-manager","namespace":"kube-system","selfLink":"/apis/extensions/v1beta1/namespaces/kube-system/deployments/kube-controller-manager","uid":"830c83d0-d860-11e6-80d5-066fd61aec22","resourceVersion":"197967","generation":5,"creationTimestamp":"2017-01-12T00:46:10Z","labels":{"k8s-app":"kube-controller-manager"},"annotations":{"deployment.kubernetes.io/revision":"1"}},"spec":{"replicas":0,"selector":{"matchLabels":{"k8s-app":"kube-controller-manager"}},"template":{"metadata":{"creationTimestamp":null,"labels":{"k8s-app":"kube-controller-manager"}},"spec":{"volumes":[{"name":"secrets","secret":{"secretName":"kube-controller-manager","defaultMode":420}},{"name":"ssl-host","hostPath":{"path":"/usr/share/ca-certificates"}}],"containers":[{"name":"kube-controller-manager","image":"quay.io/coreos/hyperkube:v1.4.7_coreos.0","command":["./hyperkube","controller-manager","--root-ca-file=/etc/kubernetes/secrets/ca.crt","--service-account-private-key-file=/etc/kubernetes/secrets/service-account.key","--leader-elect=true","--cloud-provider=aws","--configure-cloud-routes=false"],"resources":{},"volumeMounts":[{"name":"secrets","readOnly":true,"mountPath":"/etc/kubernetes/secrets"},{"name":"ssl-host","readOnly":true,"mountPath":"/etc/ssl/certs"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"Default","securityContext":{}}},"strategy":{"type":"RollingUpdate","rollingUpdate":{"maxUnavailable":1,"maxSurge":1}},"revisionHistoryLimit":0,"paused":true},"status":{"observedGeneration":3}}
I0112 17:33:54.335302 44607 round_trippers.go:296] GET https://k8s-k8s.westfield.io:443/apis/extensions/v1beta1/namespaces/kube-system/deployments/kube-controller-manager

然后超时
表示等待api响应超时。
Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.7", GitCommit:"92b4f971662de9d8770f8dcd2ee01ec226a6f6c0", GitTreeState:"clean", BuildDate:"2016-12-10T04:49:33Z", GoVersion:"go1.7.1", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.7+coreos.0", GitCommit:"0581d1a5c618b404bd4766544bec479aedef763e", GitTreeState:"clean", BuildDate:"2016-12-12T19:04:11Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}

我最初将客户端版本1.5.2降级以查看是否有帮助。没有。

最佳答案

复制 Controller 定义Pod的外观以及集群中应存在多少个副本。 Controller 管理员的工作是确保足够的副本正常运行,否则,它将要求调度程序将Pod放置在主机上。

如果您删除了某个广告连播,则应该会自动启动一个新的连播。您只需要运行:kubectl delete po <podname>
尝试删除 Controller 管理器很有趣。通常在创建之后,您不必触摸它。

关于kubernetes - 无法在kubernetes的部署中删除复制 Controller 管理器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41626234/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com