kubernetes 인증서 갱신 및 Cert IP 추가 방법

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

kubeadm init phase certs apiserver --apiserver-cert-extra-sans ${ADD_IP}
// ex. kubeadm init phase certs apiserver --apiserver-cert-extra-sans ',,,'
systemctl restart kubelet
kubectl get cm/kubeadm-config -n kube-system -o yaml | sed -n '1,20p'
You've successfully subscribed to taking
Great! Next, complete checkout to get full access to all premium content.
Error! Could not sign up. invalid link.
Welcome back! You've successfully signed in.
Error! Could not sign in. Please try again.
Success! Your account is fully activated, you now have access to all content.
Error! Stripe checkout failed.
Success! Your billing info is updated.
Error! Billing info update failed.