kubeconfig
kubeconfig is the file that permits to connect to a Kubernetes cluster.
It contains:
- cluster information
- user information
- and context
The context is the pair user / cluster that is used to connect.
Order of Precedence
Section titled “Order of Precedence”Kubee search the kubeconfig file in the following order:
- the
KUBECONFIGenv - the default kubeconfig file
~/.kube/config - in the pass at
$KUBEE_PASS_HOME/kubeconfig/$KUBEE_CONTEXT_NAME
Context check for cluster connection
Section titled “Context check for cluster connection”To be sure that the command are executed against the required cluster, kubee checks that the kubeconfig current context is equal to the KUBEE_CONTEXT_NAME.
ie the expected value should be:
apiVersion: v1kind: Configclusters: [ ]contexts: [ ]users: [ ]current-context: "$KUBEE_CONTEXT_NAME"If it’s not the case, it will try to change it and if it does not succeed, it will exit.
How To
Section titled “How To”How to see the kubeconfig file
Section titled “How to see the kubeconfig file”# with the cert cachedkubee kubectl config view# with all datakubee kubectl config view --rawHow to test a connection
Section titled “How to test a connection”kubee kubectl cluster-infoHow to encrypt
Section titled “How to encrypt”We allow encryption with pass