kubectl error: You must be logged in to the server (Unauthorized) after certificates renewal
kubectl error: You must be logged in to the server (Unauthorized) after certificates renewal
https://amalgjose.com/2021/06/21/kubectl-error-you-must-be-logged-in-to-the-server-unauthorized-how-to-fix/#:~:text=kubernetes-,kubectl%20error%3A%20You%20must%20be%20logged%20in%20to%20the,(Unauthorized)%20%E2%80%93%20how%20to%20fix&text=This%20error%20occurs%20when%20the,to%20update%20the%20certificate%20automatically.
Steps:
1. kubeadm alpha certs check-expiration
2. kubeadm alpha certs renew all
3. kubeadm alpha certs check-expiration
4. kubectl get pods --all-namespaces --> *You must be logged in to the server (Unauthorized)*
5. cp /etc/kubernetes/admin.conf .kube/config
6. reboot of all machines (masters and workers)!!!!!!!!!
https://amalgjose.com/2021/06/21/kubectl-error-you-must-be-logged-in-to-the-server-unauthorized-how-to-fix/#:~:text=kubernetes-,kubectl%20error%3A%20You%20must%20be%20logged%20in%20to%20the,(Unauthorized)%20%E2%80%93%20how%20to%20fix&text=This%20error%20occurs%20when%20the,to%20update%20the%20certificate%20automatically.
#bom
#riquadro
#k8s
kubectl error: You must be logged in to the server (Unauthorized) after certificates renewal
https://amalgjose.com/2021/06/21/kubectl-error-you-must-be-logged-in-to-the-server-unauthorized-how-to-fix/#:~:text=kubernetes-,kubectl%20error%3A%20You%20must%20be%20logged%20in%20to%20the,(Unauthorized)%20%E2%80%93%20how%20to%20fix&text=This%20error%20occurs%20when%20the,to%20update%20the%20certificate%20automatically.