Download your Kubernetes credentials

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

  • Download your Kubernetes credentials from the Okteto Cloud UI.

  • Download your Kubernetes credentials using the Okteto CLI.

Download your Kubernetes credentials from the Okteto Cloud UI

Download your Kubernetes credentials from the Okteto Cloud UI and save them in a well-known location. You should find the Credentials button at the top menu of the main screen:

Point your KUBECONFIG environment variable to the credentials file you just downloaded:

MacOS/Linux:

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

Windows:

1
> $Env:KUBECONFIG=("$HOME\Downloads\okteto-kube.config;$Env:KUBECONFIG;$HOME\.kube\config")

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

1
2
$ kubectl get all
No resources found.

If you don’t have kubectl installed, follow this guide.

Download your Kubernetes credentials using the Okteto CLI

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

Run the okteto login command to authenticate your Okteto CLI against Okteto Cloud:

1
$ okteto login

Run the following command to download your Kubernetes credentials from Okteto Cloud:

1
$ okteto namespace

The okteto namespace command merges your Okteto Cloud Kubernetes credentials with your current kubeconfig file, and sets your Okteto Cloud personal namespace as the current context. To see that the new configuration is working, enter this command:

1
2
$ kubectl get all
No resources found.

If you don’t have kubectl installed, follow this guide.