Infra/MLops

[k8s] token, certificate-key 찾기

뚜둔뚜둔 2022. 2. 15. 17:08

kubeadm

kubeadm init certificate-key 까먹었을때 ,

kubeadm init phase upload-certs --upload-certs

kubeadm init phase upload-certs --upload-certs

 

kubeadm init token 까먹었을때,

kubeadm token list

Hash 확인,

openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed 's/^.* //'

Kubernetes API Server:PORT 확인,

kubectl cluster-info

kubeadm join <Kubernetes API Server:PORT> --token <Token 값> --discovery-token-ca-cert-hash sha256:<Hash 값>

kubectl get nodes >> master node 에서 확인

반응형