civo / cli-rubygem

Command line interface for interacting with Civo's cloud API
https://www.civo.com
MIT License
15 stars 4 forks source link

Add --save to kubectl k8s config #20

Closed andyjeffries closed 5 years ago

andyjeffries commented 5 years ago

Add a --save option to kubectl k8s config which will merge the downloaded configuration with their existing ~/.kube/config file.

This relies on them already having kubectl installed and is a simple matter of shelling out like this:

KUBECONFIG=~/.kube/this-config:~/.kube/other-config \
  kubectl config view --flatten > ~/.kube/config

Of course if no ~/.kube/config file exists, simply create the folder and file.