Kubernetes 인증서 갱신
kubectl get nodes
kubeadm certs check-expiration
cp -rp /etc/kubernetes/ /etc/kubernetes_230717
cp -pr ~/.kube/ ~/kube_230717
kubeadm certs renew all
kubeadm certs check-expiration
kubectl get nodes
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
kubectl get pod -n kube-system
kill -s SIGHUP $(pidof kube-apiserver)
kill -s SIGHUP $(pidof kube-controller-manager)
kill -s SIGHUP $(pidof kube-scheduler)
systemctl restart kubelet
Kubernetes Cert IP 추가
cp -rp /etc/kubernetes/pki/apiserver.* /etc/kubernetes/pki/apiserver_230717
ADD_IP="127.0.0.1"
kubeadm init phase certs apiserver --apiserver-cert-extra-sans ${ADD_IP}
// ex. kubeadm init phase certs apiserver --apiserver-cert-extra-sans '10.10.0.246,10.10.0.171,10.10.0.11,127.0.0.1'
systemctl restart kubelet
kubectl get cm/kubeadm-config -n kube-system -o yaml | sed -n '1,20p'