Skip to main content

wf kubeconfig

wf kubeconfig

Adds your workspace provisioned clusters to your kubeconfig

Synopsis

Dynamically provisions the local kubectl configuration file with the clusters available to the workspace. The command retrieves all the clusters available and updates the kubeconfig ($HOME/.kube/config) with new contexts.

Running with a single --cluster will add a single cluster and change your current kubectl context to it (unless combined with --no-context-change). Adding --namespace will also set the default namespace.

The format for the context is <workspace>.<cluster>.

wf kubeconfig [flags]

Examples


# Update your kubeconfig with all the clusters available in the workspace
$ wf kubeconfig

# Update your kubeconfig from another workspace you are a member of
$ wf -w <workspace> kubeconfig

# Update your kubeconfig and set the current context for a specific cluster
$ wf kubeconfig --cluster <name>

Options

  -c, --cluster string       Add context for specified cluster (will set current kubectl context, unless combined with --no-context-change)
-h, --help help for kubeconfig
--ignore-deleting Filter out clusters that are deleting (default true)
-k, --kubecontext string Use a custom name for the generated context
-n, --namespace string Set the namespace on the generated context
--no-context-change Leaves your current kubectl context unchanged
-p, --non-interactive Disables prompting for kube context switch
--quiet Suppresses all non-essential output
--use-auth-proxy Uses the legacy auth proxy (pre-v2.4) to access the cluster

Options inherited from parent commands

      --debug              Debug / trace logging (default: false)
--force Force operation to happen (default: false)
--no-wait Do not wait for resources to provision
-o, --output string Output format of the resource (json,yaml,table,template) (default "table")
--profile string Use a profile other than your current - to change current: wf use profile NAME
--show-headers Display headers on table out (default true)
--verbose Verbose logging (default: false)
-w, --workspace string Workspace to use

SEE ALSO

  • wf - CLI interface for Wayfinder