0

When I run something with k3s, like kubectl apply, I'm getting

Unable to connect to the server: x509: certificate signed by unknown authority

1 Answer 1

2

This probably means you've got a dangling ~/.kube/config left over from a prior installation where you followed instructions like these to set up ~/.kube/config and you've since reinstalled k3s and left the old kubeconfig. You simply need to generate a new copy of your ~/.kube/config in your home directory.

You can do this like this,

# if not set, set it to the right location
# export KUBECONFIG=~/.kube/config

sudo k3s kubectl config view --raw > "$KUBECONFIG"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.