Getting cluster kubeconfig

Download kubeconfig from the GUI and connect to the cluster with kubectl.

Step 1. Download kubeconfig from the GUI

  1. On any page of the target cluster, click the arrow next to your username.
  2. Select Download Kubeconfig.
  3. Wait for the clustername.conf file to download automatically (see the screenshot below).
Download kubeconfig from the cluster GUI

Download Kubeconfig menu next to the username

Step 2. Choose how to use the file

Option 1: This is your main kubeconfig

If ~/.kube does not already contain a config file, move the downloaded file there and rename it if needed:

# Place in ~/.kube and rename to clustername.conf
mv /downloads/clustername.conf ~/.kube/config
# Verify config location
ls ~/.kube/ | grep config

Option 2: You already have another kubeconfig

If ~/.kube/config already contains kubeconfig for another cluster, choose one of the following:

  1. Replace the contents of ~/.kube/config with the new file:
mv /downloads/clustername.conf ~/.kube/config
  1. Or use the downloaded file separately via an environment variable:
export KUBECONFIG=/root/.kube/clustername.conf

In this case, the existing ~/.kube/config remains unchanged. Replace /root/.kube/clustername.conf with the actual path to your kubeconfig.

Step 3. Verify access

Run checks against Kubernetes objects (resources, namespaces) that your account can access through RBAC. Most users do not have cluster-wide permissions, so commands like kubectl get nodes often return Forbidden even with a valid kubeconfig.

# Verify cluster API access
kubectl cluster-info
# Example: list pods in a namespace you have access to (substitute your namespace name)
kubectl get pods -n YOUR-NAMESPACE

If you work in the default namespace and the context is already set to it, you can run kubectl get pods without -n.

Important

The token in the downloaded kubeconfig has a limited lifetime. By default, it is valid for 24 hours.

For repeated access without downloading kubeconfig again, use kubectl-shturval-plugin.

Other access methods