I have run into an issue getting logs since I renewed the certificates that expired on Kubernetes. The steps I took to renew are:
- Remove symlink for /var/lib/kubelet/pki/kubelet-client-current.conf.
- Remove /etc/kubernetes/kubelet.conf.
- Run 'kubeadm init phase kubeconfig kubelet'.
- Restart Kubelet.
- Run 'kubeadm init phase kubelet-finalize all'.
- Restart kubelet.
- Run 'kubeadm certs renew all'.
- Reboot.
- Copy /etc/kubernetes/admin.conf to .kube/config.
I performed this on all three nodes.
The kubectl commands are working fine, the kubernetes dashboard is coming up fine, but the logs show:
Get "https://192.168.200.3:10250/containerLogs/ninegold-platform-build/jenkins-0/jenkins?tailLines=5000×tamps=true": remote error: tls: internal error
All logs for all deployments are failing not just the Jenkins stateful set.
When I look at the logs using 'journalctl -u kubelet -n 100 --no-pager' I can see the following error consistently.
TLS handshake error from 127.0.0.1:56232: no serving certificate available for the kubelet
Also, Jenkins is failing to run with error:
io.fabric8.kubernetes.client.http.WebSocketHandshakeException
Any advice on any steps I have missed in renewing the certificates that would fix the handshake issue would be greatly appreciated.
Found the issue here
The steps I took to fix it.
Then in Jenkins, I updated the .kube/config file in the Jenkins secrets referenced by the deploy step of the Jenkins file.