[英]How are pods in kube-system namespace managed?
I'm trying to understand how kubernetes works, so I tried to do this operation for my minikube:我试图了解 kubernetes 的工作原理,所以我尝试为我的 minikube 执行此操作:
~ kubectl delete pod --all -n kube-system
pod "coredns-f9fd979d6-5n4b6" deleted
pod "etcd-minikube" deleted
pod "kube-apiserver-minikube" deleted
pod "kube-controller-manager-minikube" deleted
pod "kube-proxy-879lg" deleted
pod "kube-scheduler-minikube" deleted
It's okay.没关系。 Pods deleted as wish.
豆荚如愿被删除。 But if I do
kubectl get pods -n kube-system
I will see:但是如果我做
kubectl get pods -n kube-system
我会看到:
NAME READY STATUS RESTARTS AGE
coredns-f9fd979d6-5d25r 1/1 Running 0 50s
etcd-minikube 1/1 Running 0 50s
kube-apiserver-minikube 1/1 Running 0 50s
kube-controller-manager-minikube 1/1 Running 0 50s
kube-proxy-nlw69 1/1 Running 0 43s
kube-scheduler-minikube 1/1 Running 0 49s
Okay.好的。 I thought it's ReplicaSet or DaemonSet:
我以为是 ReplicaSet 或 DaemonSet:
➜ ~ kubectl get ds -n kube-system
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
kube-proxy 1 1 1 1 1 kubernetes.io/os=linux 18m
➜ ~ kubectl get rs -n kube-system
NAME DESIRED CURRENT READY AGE
coredns-f9fd979d6 1 1 1 18m
It is true for coredns
and kube-proxy
. coredns
和kube-proxy
也是如此。 But what about others ( apiserver
, etcd
, controller
and scheduler
)?但是其他人(
apiserver
, etcd
, controller
和scheduler
)呢? Why are they still alive?为什么他们还活着?
The control plane pods are run as static Pods - static Pods are not managed by the control plane controllers like eg DaemonSet and ReplicaSet.控制平面 Pod 作为static Pod 运行 - static Pod 不受控制平面控制器管理,例如 DaemonSet 和 ReplicaSet。 Static pods are instead managed by the Kubelet daemon on the local node directly.
Static pod由本地节点上的 Kubelet 守护程序直接管理。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.