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              Indicates we should use debug / trace logging (default: false)
--force Used to force an operation to happen (default: false)
--no-wait Indicates we should 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 default for this command
--show-headers Indicates we should display headers on table out (default true)
--verbose Enables verbose logging for debugging purposes (default: false)
-w, --workspace string The workspace you are operating within

SEE ALSO

  • wf - wf provides a cli for Wayfinder