pluralsh / plural-cli

cli for the plural platform
MIT License
27 stars 10 forks source link

feat: add `deployments clusters get-credentials` command #467

Closed maciaszczykm closed 1 year ago

maciaszczykm commented 1 year ago

Add plural deployments clusters get-credentials CLUSTER_ID command that updates kubeconfig file with appropriate credentials to point to specified cluster. It will overwrite existing cluster, user and context info connected with cluster name in the kubeconfig.

➜ plural deployments clusters get-credentials da6fcb3c-ef8d-4042-a821-77a2efe6ad14
set your kubectl context to cd-demo-workload-1

➜ k config current-context
cd-demo-workload-1

➜ k get node 
NAME                                                  STATUS   ROLES    AGE   VERSION
gke-cd-demo-workload-small-burst-on-d-6d59f76e-t8jt   Ready    <none>   19h   v1.26.5-gke.2700
gke-cd-demo-workload-small-burst-on-d-ac65e011-55to   Ready    <none>   19h   v1.26.5-gke.2700
gke-cd-demo-workload-small-burst-on-d-f88016f6-6r14   Ready    <none>   19h   v1.26.5-gke.2700