Skip to main content

Download your Kubernetes credentials

Download your Kubernetes credentials and start developing your applications in Okteto Cloud with your favorite CLI tools. There are two different ways of downloading your Kubernetes credentials:

Download your Kubernetes credentials using the Okteto CLI#

If this is your first time using the Okteto CLI, install it following this guide.

The Okteto CLI can download your Kubernetes credentials from Okteto Cloud. To do this, you just need to run the namespace command:

$ okteto namespace
Authentication required. Do you want to log into Okteto? [y/n]: y
What is the URL of your Okteto instance? [https://cloud.okteto.com]:
Authentication will continue in your default browser
✓ Logged in as cindy
✓ Updated context 'cloud_okteto_com' in '/Users/cindy/.kube/config'

The okteto namespace command adds your Kubernetes credentials to your kubeconfig file, and sets it as the current context. If you're not logged into Okteto Cloud yet, it also runs the login sequence. Once you do this, you'll have full access to your Kubernetes namespace with kubectl, helm or any other CLI tool.

Download your Kubernetes credentials from the Okteto Cloud UI#

Download your Kubernetes credentials and save them in a well-known location:

Download Config File

From the Okteto Cloud UI you should also find your credentials in the Settings > Setup section.

Once downloaded, point your KUBECONFIG environment variable to the credentials file:

$ export KUBECONFIG=$HOME/Downloads/okteto-kube.config:${KUBECONFIG:-$HOME/.kube/config}

To see that the new configuration is working, enter this command:

$ kubectl get all
No resources found.