Skip to main content
Version: 1.23

Environment Variables

Environment Variables provide another way to specify your credentials. This is the recommended method when scripting tasks or when creating Preview Environments.

The supported environment variables are:

  • OKTETO_TOKEN: Specifies the Personal Access Token or Admin Access Token to use (Required)
  • OKTETO_CONTEXT: Specifies the Okteto URL (Required)
  • OKTETO_NAMESPACE: Specifies the Namespace to use. If missing, it defaults to the Namespace of the current context (Optional)
tip

You can use the .env file to store your credentials. See Okteto Variables to learn more.

Reserved Variables

Certain variable names are reserved for use by the Okteto Platform only. These reserved variables can be used within the supported settings mentioned above but should not be used outside of them.

This applies to:

  • Admin Variables
  • User Variables
  • Catalog Variables
  • Variables defined at deployment time

The reserved variable names are:

  • OKTETO_NAMESPACE
  • OKTETO_CONTEXT
  • OKTETO_TOKEN
  • OKTETO_URL