oci-cli icon indicating copy to clipboard operation
oci-cli copied to clipboard

Support cluster alias names for ce cluster create-kubeconfig

Open danielwoodz opened this issue 3 years ago • 4 comments

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

danielwoodz avatar Feb 07 '22 22:02 danielwoodz

+1 this would be very helpful

gnokoheat avatar Sep 24 '22 16:09 gnokoheat

+1

lodotek avatar Mar 16 '23 18:03 lodotek