Is there an easy way to export kubeconfig file from existing cluster so i can use it in CI/CD ?
Show activity on this post. and copy the file, which is the kubeconfig for your cluster. kubectl config view --minify , it will display all the info except for the client ca certificate and client key. The location of those keys depends on how the cluster is setup.
What kind of cluster is it? A managed(AKS,EKS or GKE etc) one, where is it deployed? Can you ssh in to master node, if yes, please
cat /etc/kubernetes/admin.conf
or cat ~/.kube/config
and copy the file, which is the kubeconfig for your cluster.
Other ways to create the kubeconfig, Run the following command
kubectl config view --minify
, it will display all the info except for the client ca certificate and client key. The location of those keys depends on how the cluster is setup.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With