ahmetb / kubectl-tree

kubectl plugin to browse Kubernetes object hierarchies as a tree 🎄 (star the repo if you are using)
Apache License 2.0
2.91k stars 118 forks source link

certificate signed by unknown authority error #35

Closed Kyrremann closed 4 years ago

Kyrremann commented 4 years ago

I'm having certificate problems using this tool. Guessing it is because it's not loading local ca-bundle or something like that?

$ k tree app pt-sak-consumer
Error: failed to fetch api groups from kubernetes: Get https://apiserver.xxx.no:14125/api?timeout=32s: x509: certificate signed by unknown authority
ahmetb commented 4 years ago

We use Kubernetes client-go, so I suspect it’s a problem with that. Does kubectl work?

Most clusters that have self signed certs gave their CA data in KUBECONFIG file (either hardcoded as a file ref).

Kyrremann commented 4 years ago

kubectl works, had problems with helm 2, but helm 3 works.

No CA-data in the kubeconfig file, which I guess is the reason why tree doesn't work. It's a corporate computer.

ahmetb commented 4 years ago

I’ll keep this open, but my suspicion is that this is something client-go needs to fix since they set the tls.Config on the REST API client.

Kyrremann commented 4 years ago

It may also be a problem with my computer/certificates, a colleague of mine tried, and it worked.