HomePhabricator
Renew Certificate Kubernetes

Reference
https://www.ibm.com/docs/en/fci/1.1.0?topic=kubernetes-renewing-cluster-certificates

Step 1 Backup pki
mkdir -p $HOME/{folder-name}/pki
/bin/cp -p /etc/kubernetes/pki/*.* $HOME/{folder-name}/pki
ls -l $HOME/{folder-name}/pki/

Step 2 Backup conf
mkdir -p $HOME/{folder-name}/conf
/bin/cp -p /etc/kubernetes/*.conf $HOME/{folder-name}/conf
ls -l $HOME/{folder-name}/conf/

Step 3 backup kube config
mkdir -p $HOME/{folder-name}/.kube
/bin/cp -p ~/.kube/config $HOME/{folder-name}/.kube/.
ls -l $HOME/{folder-name}/.kube/.

Step 4 run command renew cert
kubeadm alpha certs renew all

Step 5 check renew cert
kubeadm alpha certs check-expiration

หมายเหตุ
Cert จะหมดอายุทุก 1 ปี ซึ่งจะหมดเดือนเมษายน

Written by anan on Apr 7 2022, 3:45 PM.
User
Projects
None
Subscribers
None

Event Timeline