Unable to connect
Try to connect
Section titled “Try to connect”With the default KUBECONFIG env or file (ie ~/.kube/config)
kubee kubectl cluster-info- with a specific kubeconfig
KUBECONFIG=~/.kube/k3s.yaml kubee kubectl cluster-infoMore info: https://docs.k3s.io/cluster-access
Check if your certificate is not expired
Section titled “Check if your certificate is not expired”kubee cert config-client# with a specific fileKUBECONFIG=~/.kube/k3s.yaml kubee kubectl cluster-infoExample of certificate expired properties with
Not After : Jun 24 09:29:44 2025 GMTNot After : Mar 31 09:29:07 2026 GMT
Example of expired certificate
0: CertificateCertificate: Data: Version: 3 (0x2) Serial Number: 665787286463187628 (0x93d5a02719c0aac) Signature Algorithm: ecdsa-with-SHA256 Issuer: CN=k3s-client-ca@1719221384 Validity Not Before: Jun 24 09:29:44 2024 GMT Not After : Mar 31 09:29:07 2026 GMTHow to take a new master k3s config if expired
Section titled “How to take a new master k3s config if expired”- Grab the file
/etc/rancher/k3s/k3s.yamland copy it to$HOME/.kube - Modify the
serverproperties with your server ip. Example:
apiVersion: v1clusters: - cluster: certificate-authority-data: LSxxxxQo= server: https://189.246.42.265:6443- Test a connection
KUBECONFIG=~/.kube/k3s.yaml kubee kubectl cluster-infoOptionally:
- you can rename it to the default:
$HOME/.kube/config - you can update the client cert if you use pass to store it
# set your namesKUBEE_PASS_HOME=kubeeKUBEE_CLUSTER_NAME=beau # cluster nameKUBEE_USER_NAME=default # user name
# Save the new client certificateKUBECONFIG=~/.kube/k3s.yaml kubectl config view --minify --raw --output 'jsonpath={$.users[0].user.client-certificate-data}' | pass insert -m "$KUBEE_PASS_HOME/users/$KUBEE_USER_NAME/client-certificate-data"# Save the new client ley dataKUBECONFIG=~/.kube/k3s.yaml kubectl config view --minify --raw --output 'jsonpath={$.users[0].user.client-key-data}' | pass insert -m "$KUBEE_PASS_HOME/users/$KUBEE_USER_NAME/client-key-data"
# Testkubee kubectl cluster-info