When I run something with k3s, like kubectl apply
, I'm getting
Unable to connect to the server: x509: certificate signed by unknown authority
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"