Posts

Showing posts with the label Troubleshoot

KB: Fixing Kubernetes Cluster after expired certs

Fixing Kubernetes API Server and Kubelet Issues After Expired Certificates Backup Existing Kubernetes Configuration Create a backup of Kubernetes certificates and configuration files Copy /etc/kubernetes/pki/ and /etc/kubernetes/*.conf to a backup directory Renew Expired Certificates Check expired certificates using kubeadm certs check-expiration Renew all certificates with kubeadm certs renew all Restart kubelet and container runtime using systemctl restart kubelet and systemctl restart containerd or systemctl restart docker Regenerate bootstrap-kubelet.conf if Missing Run kubeadm init phase kubelet-start to regenerate it If still missing, manually copy admin.conf to kubelet.conf Restart kubelet using systemctl restart kubelet Fix Unauthorized Errors Ensure kubectl is using the correct kubeconfig Copy /etc/kubernetes/admin.conf to ~/.kube/config and set proper ownership and permissions Check kubelet logs for authentication errors with journalctl ...