By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account Import K3S cluster:Cluster health check failed: Failed to communicate with API server during namespace check: Unauthorized #32636 Import K3S cluster:Cluster health check failed: Failed to communicate with API server during namespace check: Unauthorized #32636 GLTSC opened this issue May 8, 2021 · 2 comments

Question

Steps to reproduce:

Rancher, K3S installed offline. An error was reported when importing the cluster.

Result:

Cluster health check failed: Failed to communicate with API server: Unauthorized

Other details that may be helpful:
Rancher Error

E0508 03:32:55.660471       7 reflector.go:139] pkg/mod/github.com/rancher/client-go@v1.20.0-rancher.1/tools/cache/reflector.go:168: Failed to watch *v1.Job: failed to list *v1.Job: Unauthorized

Environment information

Rancher version:
v2.5.7
Installation option: Single point, offline

docker run -d --restart=unless-stopped --name rancher-server --privileged \
  -p 880:80 -p 8443:443 \
  -e CATTLE_SYSTEM_DEFAULT_REGISTRY=192.168.1.100/library \
  -e CATTLE_SYSTEM_CATALOG=bundled \
  -v /var/lib/rancher:/var/lib/rancher \
  -v /var/log/auditlog:/var/log/auditlog \
  -v /run/k3s/containerd:/run/k3s/containerd \
  -v /etc/rancher/k3s:/etc/rancher/k3s \
  192.168.1.100/library/rancher/rancher:v2.5.7

Cluster information

Cluster type: Hosted K3S
Version: v1.21.0+k3s1
Installation option: offline

INSTALL_K3S_SKIP_DOWNLOAD=true INSTALL_K3S_EXEC='--docker' K3S_KUBECONFIG_MODE="644" /root/k3s-install.sh