Skip to content

cub target access

cub target access

Get temporary kubectl access to a cluster

Synopsis

Request temporary kubectl access by invoking the generate-kubecontext function on an access policy unit applied to a target. The unit must contain a ServiceAccount with the confighub.com/generate-kubecontext: allow annotation and must have been applied to the target.

The resulting kubeconfig is encrypted end-to-end — the ConfigHub server never sees the credentials.

cub target access <target-slug> <access-config-unit-slug> [flags]

Options

  -h, --help            help for access
      --output string   write kubeconfig to this file instead of stdout
      --ttl string      requested token TTL (e.g., 30m, 1h); capped by the policy's max-ttl

Options inherited from parent commands

      --context string   The context to use for this command
      --debug            Debug output
      --space string     space ID to perform command on

SEE ALSO