Get A Quote

Book A Demo

Locate the Kubernetes KubeConfig File

< 1 min read

Overview #

When adding a Kubernetes environment to NiralOS EDGE, you must upload a valid kubeconfig file.

The kubeconfig contains the information required to securely connect to your Kubernetes cluster.

This guide explains where to find the kubeconfig file on different platforms.

Standard Kubernetes Installation (Linux) #

Most Kubernetes distributions store the kubeconfig at:

~/.kube/config

Verify that the file exists.

ls ~/.kube/config

K3s #

K3s stores its kubeconfig at:

/etc/rancher/k3s/k3s.yaml

To copy it to your user account:

mkdir -p ~/.kube
sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
sudo chown $USER:$USER ~/.kube/config

MicroK8s #

Export the kubeconfig.

microk8s config > ~/.kube/config

Windows (Docker Desktop Kubernetes) #

If Kubernetes is enabled in Docker Desktop, the kubeconfig is automatically created.

Default location:

C:\Users\<username>\.kube\config

To enable Kubernetes:

  1. Open Docker Desktop. 
  2. Go to Settings → Kubernetes. 
  3. Enable Kubernetes. 
  4. Click Apply & Restart.

macOS (Docker Desktop) #

Docker Desktop stores the kubeconfig at:

~/.kube/config