Skip to content

Add option to override kube context on tsh kube login#24972

Merged
tigrato merged 1 commit intomasterfrom
tigrato/add-context-override-option
Apr 27, 2023
Merged

Add option to override kube context on tsh kube login#24972
tigrato merged 1 commit intomasterfrom
tigrato/add-context-override-option

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Apr 21, 2023

This PR allows users to change the kubeconfig's context name when tsh kube login is executed.

It allows users to override our default naming convention {teleport-cluster}-{kube-cluster} and replace it with a custom name.

tsh kube login cluster --set-context-name=ctx overrides the context name to ctx. --set-context cannot be executed with --all.

Fixes #12833

This PR allows users to change the kubeconfig's context name when `tsh
kube login` is executed.

It allows users to override our default naming convention
`{teleport-cluster}-{kube-cluster}` and replace it with a custom name.

`tsh kube login cluster --set-context-name=ctx` overrides the context
name to `ctx`. `--set-context` cannot be executed with `--all`.

Fixes #12833
@github-actions github-actions Bot requested review from nklaassen and xacrimon April 21, 2023 13:55
@github-actions github-actions Bot added kubernetes-access size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels Apr 21, 2023
@tigrato tigrato added this pull request to the merge queue Apr 27, 2023
Merged via the queue into master with commit 9ab997f Apr 27, 2023
@tigrato tigrato deleted the tigrato/add-context-override-option branch April 27, 2023 10:06
@public-teleport-github-review-bot
Copy link
Copy Markdown

@tigrato See the table below for backport results.

Branch Result
branch/v10 Failed
branch/v11 Failed
branch/v12 Create PR
branch/v13 Create PR

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

Labels

kubernetes-access size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modifying cluster name from the Kubernetes context

3 participants