Skip to content

Latest commit

 

History

History
64 lines (46 loc) · 3.08 KB

stackit_ske_kubeconfig_login.md

File metadata and controls

64 lines (46 loc) · 3.08 KB

stackit ske kubeconfig login

Login plugin for kubernetes clients

Synopsis

Login plugin for kubernetes clients, that creates short-lived credentials to authenticate against a STACKIT Kubernetes Engine (SKE) cluster. First you need to obtain a kubeconfig for use with the login command (first or second example). Secondly you use the kubeconfig with your chosen Kubernetes client (third example), the client will automatically retrieve the credentials via the STACKIT CLI.

Project ID and region are resolved with the following precedence:

Explicit flag Global config Exec cluster config Result
Not set Set Not set Global config
Set Set Not set Explicit flag
Not set Set Set Exec cluster config
Set Set Set Explicit flag
stackit ske kubeconfig login [flags]

Examples

  Get an admin, login kubeconfig for the SKE cluster with name "my-cluster". This kubeconfig does not contain any credentials and instead obtains valid admin credentials via the `stackit ske kubeconfig login` command.
  $ stackit ske kubeconfig create my-cluster --login

  Get an IDP kubeconfig for the SKE cluster with name "my-cluster". This kubeconfig does not contain any credentials and instead obtains valid credentials via the `stackit ske kubeconfig login` command.
  $ stackit ske kubeconfig create my-cluster --idp

  Use the previously saved kubeconfig to authenticate to the SKE cluster, in this case with kubectl.
  $ kubectl cluster-info
  $ kubectl get pods

  Configure an IdP exec provider for a Kubernetes client that does not provide cluster information. In an SKE workload, the CLI automatically uses the projected workload identity token.
  $ stackit ske kubeconfig login --idp --cluster-name my-cluster --organization-id my-organization-id --project-id my-project-id --region eu01

Options

      --cluster-name string      SKE cluster name. Used when the Kubernetes exec request does not provide cluster information.
  -h, --help                     Help for "stackit ske kubeconfig login"
      --idp                      Use the STACKIT IdP for authentication to the cluster.
      --organization-id string   Organization ID. Used in IdP mode when the Kubernetes exec request does not provide cluster information.

Options inherited from parent commands

  -y, --assume-yes             If set, skips all confirmation prompts
      --async                  If set, runs the command asynchronously
  -o, --output-format string   Output format, (one of: [json, pretty, none, yaml])
  -p, --project-id string      Project ID
      --region string          Target region for region-specific requests
      --verbosity string       Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")

SEE ALSO