[Kubernetes] kubeadm join 에러
Token 인증 에러
분명 Master Node에서 kubeadm init
하고 나온 출력문을 그대로 복붙했지만 에러가 발생했네요..?
에러 로그를 보아 하니 token 인증 실패가 떴습니다..흐음 그럼 재발급 받아야지요~뭐~
에러 로그
root@worker-node1:~# kubeadm join 10.41.2.156:6443 --token 65z741.dd70q5p4d17ch3cv \
> --discovery-token-ca-cert-hash sha256:a6949071dd2204e2ae577f890f5c58b330b0055ee14773f70264789
[preflight] Running pre-flight checks
error execution phase preflight: couldn't validate the identity of the API Server: invalid discovery token CA certificate hash: invalid hash "sha256:a6949071dd2204e2ae577f890f5c58b330b0055ee14773f70264789", expected a 32 byte SHA-256 hash, found 27 bytes
To see the stack trace of this error execute with --v=5 or higher
이슈 해결
- 왜인지 모를 Token 불일치!!에러!!!!
- Token 다시 생성하고
kubeadm join
해 준다면 Master Node와 연결 완료! 간-단!
root@master-node1:~# kubeadm token list
TOKEN TTL EXPIRES USAGES DESCRIPTION EXTRA GROUPS
65z741.dd70q5p4d17ch3cv 23h 2022-05-03T15:59:09Z authentication,signing The default bootstrap token generated by 'kubeadm init'. system:bootstrappers:kubeadm:default-node-token
root@master-node1:~# kubeadm token delete 65z741.dd70q5p4d17ch3cv
bootstrap token "65z741" deleted
root@master-node1:~# kubeadm token list
root@master-node1:~# kubeadm token create --print-join-command
kubeadm join 10.41.2.156:6443 --token 0toaxd.7se6f4jxz6zlu1qr --discovery-token-ca-cert-hash sha256:a6949071dd2204e2ae577f890f5c58b330b0055ee14773f702647895be919c0a
Leave a comment