Error : couldn’t validate the identity of the API Server
In K8S cluster, I add one node to master server by “kubeadm ioin” command, but failed.
The problem is “Error: couldn’t validate the identity of the API Server” as shown in following.
Error reason: API server authentication failed, token is invalid,
Need to check token.Execute “kubeadm token list”,but there is nothing.
So I’ll generate a new token by executing the following command
kubeadm token create
kubeadm token list
openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin outform der 2>/dev/null | openssl dgst -sha256 -hex | sed ‘s/^.* //’
The next step is to execute “kubeadm join” command again to join the node to master.
kubeadm join 192.168.137.130:6443 –token ik5e4e.mk0m5wtg8jwfcm5p –discovery-token-ca-cert-hash sha256: a138a93b829e227db5677de415d84388096144a42dc4ee1c0de2bcb18c488245
This error had been resloved.