pw kube token
pw kube token
Token to authenticate with the Kubernetes API
Synopsis
The pw kube token command prints a short-lived Kubernetes API token for a cluster, wrapped in the ExecCredential JSON that kubectl exec plugins expect.
It trades your CLI credential for an ID token for the cluster through the OAuth token exchange (RFC 8693) at the platform's token endpoint. kubectl keeps the token only in memory, so each kubectl command runs this again; a long-running client reuses it until its expirationTimestamp.
pw kube auth installs this command as the exec plugin in your kubeconfig, so kubectl runs it for you; you rarely need to run it directly.
pw kube token <cluster> [flags]Examples
pw kube token demoOptions
-h, --help help for tokenOptions inherited from parent commands
--context string The context to use. Overrides PW_CONTEXT environment variable and current context from config.
--platform-host string The Parallel Works ACTIVATE platform host to use. Overrides PW_PLATFORM_HOST environment variable and the current context's server.
-v, --verbose Enable verbose loggingSEE ALSO
- pw kube - Kubernetes commands