Helm Charts: How to install a package in a K0s cluster?

1.3k Views Asked by At

I am aiming to install a helm package in a k0s cluster throught the use of the following command:

helm install name . --kube-apiserver=x.x.x.x:xxx

But I get the following output:

Kubernetes cluster unreachable: Get "http://x.x.x.x:xxx/version?timeout=32s": dial tcp x.x.x.x:x: connect: connection refused

I am wondering:

  1. what is the right syntax for --kube-apiserver ?
  2. why the server is rejecting the request ?
  3. how to resolve it ?
1

There are 1 best solutions below

0
On BEST ANSWER

I ran into this issue, and followed the instructions at https://www.mirantis.com/blog/how-to-set-up-k0s-kubernetes-a-quick-and-dirty-guide/ :

sudo cp /var/lib/k0s/pki/admin.conf ~/admin.conf
export KUBECONFIG=~/admin.conf

I add to ensure that admin.conf was owned by my user and didn't have group read:

sudo chown <user> ./admin.conf
chmod g-r ./admin.conf

Then helm install worked