Support cluster alias names for ce cluster create-kubeconfig
Open
Nobody has claimed this yet.
Container Engine
- Dominant language
- Python
- Stars
- 669
- Forks
- 236
- Avg merge
- 1m
- Merged PRs (30d)
- 4
Description
As a user with tens of Kubernetes clusters, I would like to be able to alias a cluster name at time of creation.
Currently I have to invoke the following:
oci ce cluster create-kubeconfig \
--cluster-id ocid1.cluster.oc1.eu-frankfurt-1.aaaaaaaaaaaaaaaaaaaacp22ofzv4ra \
--file $HOME/.kube/config --region eu-frankfurt-1 --token-version 2.0.0 \
&& kubectx desired_context_alias=context-cp22ofzv4ra
I would appreciate not having to enter two commands, like other cloud providers allow with an --alias flag.
Example:
oci ce cluster create-kubeconfig \
--cluster-id ocid1.cluster.oc1.eu-frankfurt-1.aaaaaaaaaaaaaaaaaaaacp22ofzv4ra \
--file $HOME/.kube/config --region eu-frankfurt-1 --token-version 2.0.0 \
--alias desired_context_alias
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.
Research direction
Start at the implementation of the oci ce cluster create-kubeconfig command and trace how it builds the Kubernetes context. Check how command options are defined and how the generated kubeconfig is validated; done means an alias option is accepted and the resulting context uses that alias.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, python
- Domain
- cli, cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100