Microk8s: How to use halm 3 with microk8s claster?

Created on 28 Nov 2019  路  6Comments  路  Source: ubuntu/microk8s

I installed halm 3 and tried to install Postgres and got Error: Kubernetes cluster unreachable. In debug logs, I found that helm tries to connect to cluster by 8080 port but cluster work on a different port. Seems that helm cant find kubeconfig file and use default settings. Where I can find kubeconfig file?

Most helpful comment

raw is not deprecated. There was just a mistake in the command. It should have been something like this microk8s.kubectl config view --raw > /tmp/kubeconfig.yaml

Without --raw, you might not have the certificates data in base64.

All 6 comments

https://microk8s.io/docs/commands#microk8s.config
Pipe the output of microk8s.config view --raw into a file and point kubectl at that file. Typically you'd use ~/.kube/config. See more details here on managing your kube config files: https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/

getopt: unrecognized option '--raw'
Try `getopt --help' for more information.

--raw is important?

Looks like it is not.. I was referring to old/out of date documentation. This should work:
microk8s.kubectl config view > $HOME/.kube/config

raw is not deprecated. There was just a mistake in the command. It should have been something like this microk8s.kubectl config view --raw > /tmp/kubeconfig.yaml

Without --raw, you might not have the certificates data in base64.

@balchua Thanks - not enough sleep for me I guess. I combined 2 commands. The repo's README had the correct command the whole time... https://github.com/ubuntu/microk8s

Sorry for the confusion.

The problem is solved. Thank you all for your help.

Was this page helpful?
0 / 5 - 0 ratings