KUBECONFIG with pass
If kubee does not find:
- a
KUBECONFIGenv - or a
~/.kube/configfile,
it will try to retrieve the the kubeconfig file from the pass store.
I will execute the following command:
pass "$KUBEE_PASS_HOME/kubeconfig/$KUBEE_CONTEXT_NAME"where:
$KUBEE_PASS_HOMEis the path prefix in pass (default tokubee)$KUBEE_CONTEXT_NAMEis the kubeconfig context name (default to the valuedefault@$KUBEE_CLUSTER_NAME)
With the default value, the command is:
pass "kubee/kubeconfig/default@$KUBEE_CLUSTER_NAME"It’s a zero-trust connection tool.
KUBEE_CLUSTER_NAME: The cluster to connect (default todefault)KUBEE_CLUSTER_SERVER_IP: the server ip used by defaultKUBEE_USER_NAME: The user to connect with (default todefault)KUBEE_PASS_HOME: The name directory where to storekubeepass information (default tokubee)KUBEE_CONNECTION_NAMESPACE: the connection namespace (default to the app namespace or to the KUBEE_DEFAULT_NAMESPACE)KUBEE_CHART_NAMESPACE: the chart namespace found in the chart values file.
How to store kubeconfig in pass ?
Section titled “How to store kubeconfig in pass ?”# The pass home directory (default to kubee)export KUBEE_PASS_HOME="kubee"# The cluster nameexport KUBEE_CLUSTER_NAME="your-cluster-name"
# Store itcat $HOME/.kube/config | pass insert -m "$KUBEE_PASS_HOME/kubeconfig/default@$KUBEE_CLUSTER_NAME"How to see the generated config file
Section titled “How to see the generated config file”kubee kubectl config viewHow to test
Section titled “How to test”kubee kubectl cluster-info