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?
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.
Most helpful comment
rawis not deprecated. There was just a mistake in the command. It should have been something like thismicrok8s.kubectl config view --raw > /tmp/kubeconfig.yamlWithout
--raw, you might not have the certificates data in base64.