Azure / k8s-set-context

GitHub Action for setting context and retrieving Kubeconfig before deploying to Kubernetes clusters
MIT License
85 stars 34 forks source link

Provide a simple instruction to get kubeconfig file content for generic kubernetes cluster #46

Closed turastory closed 2 years ago

turastory commented 2 years ago

At first it was not clear to me what 'the contents' of kubeconfig means and spent some time to find a way.

The README gives a link to the official documentation but for those who are not familiar with k8s(like me), it would be useful if they can find more explicit way to retrieve the contents of kubeconfig file, like the following:

cat $HOME/.kube/config
OliverMKing commented 2 years ago

The instructions link to this which explains that you can use kubectl config view.

DavidGoodwin commented 1 year ago

knowing ... kubectl config view -o json ... and seeing https://github.com/Azure/k8s-set-context/blob/main/tests/expected-kubeconfig.json helps ...