cli: add support for --kubeconfig flag
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Start by locating the CLI command setup and the existing Kubernetes client configuration, then trace how the KUBECONFIG environment variable is read. Verify the relevant command help and tests before implementing the flag; done means CLI requests can use an explicitly supplied kubeconfig path without relying on KUBECONFIG.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Go
- Stars
- 19
- Forks
- 31
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 52
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from crossplane/cli
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
crossplane/cli#282 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
crossplane/cli#384 ·
-
crossplane/cli#379 · 1 assignee ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 68/100
crossplane/cli#370 · 1 reaction ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 28/100
crossplane/cli#369 ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bazel-contrib/rules_go#4726 · 1 comment ·
-
area/auto-scaling area/monitoring area/ops-productivity kind/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Type/Improvement
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
OpenNSW/nsw-srilanka#522 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100