oracle / oracle/oci-cli

Support cluster alias names for ce cluster create-kubeconfig

Open
#500 4 comments 8 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.