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

Merge kube context into existing config

Open h3adex opened this issue 1 year ago • 1 comments

It would be a great improvement if we could get some sort of merge option for creating kubeconfigs instead of OVERWRITE by default.

e.g.

stackit ske kubeconfig create k8s-xxx-01 --merge

h3adex avatar Jul 10 '24 07:07 h3adex

Hi @h3adex,

Thanks for reaching out, that is a good suggestion. We will add the topic to our backlog.

joaopalet avatar Jul 10 '24 10:07 joaopalet

any update?

fjvela avatar Jan 09 '25 07:01 fjvela

We still have it in our backlog and will look at prioritising it higher.

marceljk avatar Jan 09 '25 10:01 marceljk

I created the PR https://github.com/stackitcloud/stackit-cli/pull/557/files to merge the kubeonfig instead of overwrite it.

I did it using the command kubeconfig create. I am thinking it would be better to add a new subcommand like kubeconfig get-credentials

What do you think ?

fjvela avatar Jan 15 '25 06:01 fjvela

Hi @fjvela,

Thanks for your contribution. I've discussed the change from overwrite to merge with the SKE team. We prefer to have the option to overwrite the kubeconfig as well. Could you please add a flag --overwrite to this command to overwrite a kubeconfig instead of merging it? You can keep the command as kubeconfig create.

marceljk avatar Jan 15 '25 08:01 marceljk

Released with v0.22.0: https://github.com/stackitcloud/stackit-cli/releases/tag/v0.22.0

rubenhoenle avatar Mar 27 '25 12:03 rubenhoenle