Skip to content

CLI Access

Use CLI Access when you want to work with a managed cluster through kubectl, Helm, or automation instead of the console.

Each cluster exposes two kubeconfig options from the cluster’s CLI Access dialog:

  • OIDC kubeconfig for engineers working interactively
  • Token kubeconfig for automation, CI, and scripts

This is the recommended option for humans.

Use it when you want:

  • interactive kubectl access
  • browser-based sign-in through SSO
  • short-lived credentials instead of stored long-lived tokens
  • Requires kubelogin installed locally
  • Opens your browser for sign-in when needed
  • Uses an 8-hour access token
  1. Install kubelogin.
  2. Open your cluster in the console.
  3. Open CLI Access.
  4. Download the OIDC kubeconfig.
  5. Run:
Terminal window
kubectl --kubeconfig ./<cluster>-oidc.kubeconfig get ns

This is the best default for day-to-day engineering work.

This is the recommended option for non-interactive systems.

Use it when you want:

  • CI/CD access
  • scripts and scheduled jobs
  • environments where browser sign-in is not practical
  • No browser interaction
  • Expiry is chosen when you generate the kubeconfig
  • Supported lifetimes go up to 365 days

Available durations:

  • 8 hours
  • 24 hours
  • 7 days
  • 30 days
  • 90 days
  • 365 days
  1. Open CLI Access for the cluster in the console.
  2. Download a token kubeconfig and choose the shortest useful expiry.
  3. Run:
Terminal window
kubectl --kubeconfig ./<cluster>-token.kubeconfig get pods -A
Use caseRecommended option
Local development and troubleshootingOIDC kubeconfig
Regular kubectl and Helm use by engineersOIDC kubeconfig
CI pipelines and GitHub ActionsToken kubeconfig
Scheduled jobs and service automationToken kubeconfig

If a person is using the cluster directly, choose OIDC. If a system is using the cluster, choose a token.

  • Prefer the shortest practical token lifetime for automation.
  • Rotate long-lived automation kubeconfigs regularly.
  • Store kubeconfigs in a secret manager, not in source control.
  • Treat downloaded kubeconfigs like credentials, because they are.