Using helm and a Kubernetes Cluster with Microk8s on one or two local physical Ubuntu server

3.5k Views Asked by At

I installed Microk8s on a local physical Ubuntu 20-04 server (without a GUI):

 microk8s status --wait-ready
microk8s is running
high-availability: no
  datastore master nodes: 127.0.0.1:19001
  datastore standby nodes: none
addons:
  enabled:
    ha-cluster           # Configure high availability on the current node
    helm                 # Helm 2 - the package manager for Kubernetes
  disabled:

When I try to install something with helm it says:

Error: INSTALLATION FAILED: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp 127.0.0.1:8080: connect: connection refused

What configuration has to be done to use the MicroK8s Kubernetes cluster for helm installations? Do I have to enable more MicroK8s services for that? Can I run a Kubernetes cluster on one or two single local physical Ubuntu server with MicroK8s?

1

There are 1 best solutions below

0
On

Searching for solution for your issue, I have found this one. Try to run:

[microk8s] kubectl config view --raw > ~/.kube/config

Helm interacts directly with the Kubernetes API server so it needs to be able to connect to a Kubernetes cluster. Helms reads the same configuration files used by kubectl to do it automatically.

Based on Learning Helm by O'Reilly Media:

Helm will try to find this information by reading the environment variable $KUBECONFIG. If that is not set, it will look in the same default locations that kubectl looks in.


See also: