Skip to main content
Version: 1.10

Download your Kubernetes credentials

Download your Kubernetes credentials and start developing your applications in Okteto 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. To do this, run the okteto context command:

$ okteto context use https://cloud.okteto.com
Authentication will continue in your default browser
✓ Context 'cloud.okteto.com' created

If you're not logged into Okteto yet, it will also run the login sequence.

Once your okteto context is configured to access Okteto, run the following command:

$ okteto kubeconfig
Updated kubernetes context 'cloud_okteto_com/cindylopez' in '/Users/cindylopez/.kube/config'

The okteto kubeconfig command adds your Kubernetes credentials to your kubeconfig file, and sets it as the current Kubernetes context. 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 dashboard

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

Download Config File

From the Okteto dashboard 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.

Using your Kubernetes credentials

Once you've downloaded your credentials, you'll have full access to your Kubernetes namespaces on Okteto directly from your terminal, using the tools you're already familiar with, such as helm, kubectl, okteto or skaffold.

For example, you could use kubectl to deploy our hello-world application:

kubectl apply -f https://raw.githubusercontent.com/okteto/go-getting-started/master/k8s.yml