Error: certificate signed by unknown authority
Quote from Moshe Sharon on 10/10/2022, 7:43 amProblem
User gets the following error when running any kubectl command
Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")
Solution
This issue occurred due to certificate change probably you ran again kubeamd reset.
delete config file from your home directory and copy
rm -rf $HOME/.kube
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
Problem
User gets the following error when running any kubectl command
Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")
Solution
This issue occurred due to certificate change probably you ran again kubeamd reset.
delete config file from your home directory and copy
rm -rf $HOME/.kube
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config