Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to share .kube/config?

Tags:

kubernetes

There are multiple admins who accesses k8s clusters. What is the recommended way to share the config file?

I know,

kubectl config view --minify

but certification part is REDACTED by this command.

like image 1000
Naoyoshi Aikawa Avatar asked Dec 14 '15 14:12

Naoyoshi Aikawa


People also ask

Where is the kube config file?

By default, kubectl looks for a file named config in the $HOME/. kube directory. You can specify other kubeconfig files by setting the KUBECONFIG environment variable or by setting the --kubeconfig flag.

How do I export from Kubeconfig?

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.

Is kube config sensitive?

Authentication Material: KubeConfig This file is very sensitive and if found can allow an attacker administrative access to the Kubernetes Cluster. During penetration testing, testers will commonly search for this file rather than trying to run exploits against the Kubernetes.


1 Answers

You can add the --flatten flag, which is described in the document to "flatten the resulting kubeconfig file into self contained output (useful for creating portable kubeconfig files)"

like image 50
Yu-Ju Hong Avatar answered Sep 23 '22 07:09

Yu-Ju Hong