Troubleshooting k3s
Kubernetes dashboard
In case you want to see more about what’s happening in the cluster, you can run the k8s dashboard as follows (source):
GITHUB_URL=https://github.com/kubernetes/dashboard/releasesVERSION_KUBE_DASHBOARD=$(curl -w '%{url_effective}' -I -L -s -S ${GITHUB_URL}/latest -o /dev/null | sed -e 's|.*/||')kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/${VERSION_KUBE_DASHBOARD}/aio/deploy/recommended.yaml
Then, create dashboard.admin-user.yml
and dashboard.admin-user-role.yml
with the content specified here.
Lastly, run:
kubectl create -f dashboard.admin-user.yml -f dashboard.admin-user-role.yml
kubectl -n kubernetes-dashboard describe secret admin-user-token | grep ^token
kubectl proxy
You can now open the k8s dashboard at http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/ and sign in with user admin-user
and as password the token grepped in the previous step.
Traefik dashboard
To troubleshoot traefik, it’s sometimes easiest to view the traefik dashboard.
For that, do the following:
Run kubectl -n kube-system edit configmap traefik
, then add:
[api]
dashboard = true
Then run a proxy (kubectl -n kube-system port-forward deployment/traefik 8080
) and open http://localhost:8080 to load the traefik dashboard.