The client certificate has expired
CommonThe kubeconfig authenticates with client-certificate-data and that certificate's notAfter date has passed. On kubeadm clusters this happens one year after init or the last upgrade, for admin.conf and every copy of it in people's ~/.kube/config.
Confirm
kubectl config view --raw --minify -o jsonpath='{.users[0].user.client-certificate-data}' | base64 -d | openssl x509 -noout -enddateA notAfter date in the past. On a kubeadm control-plane node, sudo kubeadm certs check-expiration shows every certificate's remaining time
Fix
- On each control-plane node, renew with kubeadm certs renew all.
- Restart the control-plane static pods so they load the new certificates. kubeadm's documentation says to do this because not every component reloads certificates dynamically; move a manifest out of /etc/kubernetes/manifests/, wait about 20 seconds, then move it back.
- Copy the renewed admin.conf into ~/.kube/config again, for everyone who had a copy.
- Plan an upgrade or a renewal reminder well before next year's date.
sudo kubeadm certs check-expiration sudo kubeadm certs renew all sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config
From kubeadm's certificate management guide. Run the renewal on every control-plane node, and restart the control-plane static pods in between, as that guide describes.