Home > Mobile >  what should I do to restart the kubernetes controller panel after renew the certificate
what should I do to restart the kubernetes controller panel after renew the certificate

Time:08-04

Today, my kubernetes(v1.21) cluster certificate was expired(1 year), after I using this command to renew the certificate:

kubeadm certs renew all

the logs shows that the kube-apiserver\etcd should be restart:

Done renewing certificates. You must restart the kube-apiserver, kube-controller-manager, kube-scheduler and etcd, so that they can use the new certificates.

I have tried this way to restart:

[root@k8smasterone ~]# systemctl restart kube-apiserver
Failed to restart kube-apiserver.service: Unit not found.

what should I do to restart all the component's properly? I also tried to find the kubernetes pods that did not found pods with kubernetes with api server.

CodePudding user response:

Failed to restart kube-apiserver.service: Unit not found.

Restart the kubelet on the master node, your kube-apiserver runs as static pod. Example: systemctl restart kubelet. When you do this on the master node, all core components (kube-*) will be restarted.

  • Related