pw kube auth
pw kube auth
Set up cluster configuration
Synopsis
The pw kube auth command configures kubectl access to a platform Kubernetes cluster. It writes cluster, user, and context entries, named after the cluster with a pw# prefix, to your kubeconfig (~/.kube/config, or the file KUBECONFIG points to) and switches to the new context unless --no-context-switch is given.
The user entry authenticates through an exec plugin that runs pw kube token, so kubectl follows the CLI's current context and credentials.
Requires kubectl 1.22 or newer on your PATH. Run pw kube ls to list the clusters available to you.
pw kube auth <cluster> [flags]Examples
pw kube auth demo
# Configure kubectl without switching the current context
pw kube auth --no-context-switch demoOptions
-h, --help help for auth
--no-context-switch Skip switching to the new context after configurationOptions 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