gardenctl-v2 icon indicating copy to clipboard operation
gardenctl-v2 copied to clipboard

kubectl-env should provide all relevant kubeconfigs (seed, control plane, shoot, garden)

Open petersutter opened this issue 3 years ago • 1 comments

What would you like to be added: the kubectl-env subcommand should provide all relevant kubeconfigs.

E.g. if a Shoot cluster is targeted, the kubeconfig should contain the following kubeconfigs (contexts, clusters and users):

  • shoot kubeconfig (this should be the current context)
  • seed kubeconfig with seed-shoot namespace set of the Shoot (control plane access)
  • original seed kubeconfig (maybe not needed because of the control plane kubeconfig?)
  • garden cluster kubeconfig with project namespace set

If the seed is targeted, it should only contain:

  • original seed kubeconfig
  • garden cluster kubeconfig with garden namespace set

etc.

Why is this needed: So that the user can easily switch the contexts to jump from the control plane to the shoot to the garden cluster

petersutter avatar Jan 26 '22 17:01 petersutter

as we just discussed this with @rfranzke the question came up if we rather

  1. would want to have stable context names for easier switching
contexts:
- name: shoot-external
- name: shoot-internal
- name: control-plane
- name: seed (maybe not needed)
- name: garden
  1. or have the target name (e.g. shoot name) within the context name for easier identification of the context
contexts:
- name: shoot-external--my-cluster
- name: shoot-internal--my-cluster
- name: control-plane--my-cluster
- name: seed--aws1 (maybe not needed)
- name: garden--landscape-dev

petersutter avatar Jan 27 '22 10:01 petersutter