Skip to content

cli: add support for --kubeconfig flag #386

Description

@gberche-orange

What problem are you facing?

Switching around kubeconfig files using the KUBECONFIG environment variable might be error prone (e.g. when running commands from history in distinct terminals).

How could Crossplane help solve your problem?

Kubectl and most k8s related clis support the --kubeconfig command line argument in order to support "stateless commands" that don't rely on KUBECONFIG environment variable being set

flux --help | grep '\--kubeconfig'
#>      --kubeconfig string              Path to the kubeconfig file to use for CLI requests.

kubectl cnpg --help | grep '\--kubeconfig'
#>      --kubeconfig string                 Path to the kubeconfig file to use for CLI requests.

kyverno --help | grep 'kubeconfig'
#      --kubeconfig string                   Paths to a kubeconfig. Only required if out-of-cluster.

velero --help | grep 'kubeconfig'
#>      --kubeconfig string                   Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration

k9s --help | grep '\--kubeconfig'
#>      --kubeconfig string              Path to the kubeconfig file to use for CLI requests

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions