Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error"

0 votes

Hi Guys,

I am trying to kubectl get pods command in my Kubernetes Cluster. But it is showing m the below error.

$ kubectl get pods
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")
Jul 15 in Kubernetes by akhtar
• 25,430 points
1,156 views

2 answers to this question.

0 votes

Hi@akhtar,

The following error indicates a possible certificate mismatch. You need to verify that the $HOME/.kube/config file contains a valid certificate, and regenerate a certificate if necessary. The certificates in a kubeconfig file are base64 encoded. The base64 --decode command can be used to decode the certificate and OpenSSL x509 -text -noout can be used for viewing the certificate information.

answered Jul 15 by MD
• 57,680 points
0 votes
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
answered 22 hours ago by Muhammad Badi uz Zaman

Related Questions In Kubernetes

0 votes
1 answer

When I try to connect to the WebSocket through the gateway I get a 403 error

Try upgrading Contour to v0.6.0-beta.3 with IngressRoute You can ...READ MORE

answered Oct 1, 2018 in Kubernetes by Kalgi
• 51,950 points
1,026 views
0 votes
2 answers
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
8,430 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 11, 2019 in Kubernetes by Kalgi
• 51,950 points

reshown Apr 12, 2019 by Kalgi 2,553 views
0 votes
1 answer