RhythmicDevil
RhythmicDevil

Reputation: 845

Basic install of k3s has no nodes

I followed the instructions here to install k3s. I also watched this tutorial. In both cases they show running this command after the install:

k3s kubectl get node

However when I do that I get this:

# k3s kubectl get node
No resources found

What reasons could there be for this not working?

If I specify the kubeconfig file that Rancher creates, I get the same response.

# kubectl --kubeconfig /etc/rancher/k3s/k3s.yaml get node
No resources found

I believe that the cluster is running:

# kubectl --kubeconfig /etc/rancher/k3s/k3s.yaml cluster-info
Kubernetes control plane is running at https://127.0.0.1:6443
CoreDNS is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Metrics-server is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

Services and Namespaces

# kubectl --kubeconfig /etc/rancher/k3s/k3s.yaml get svc
NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kubernetes   ClusterIP   10.43.0.1    <none>        443/TCP   16h

# kubectl --kubeconfig /etc/rancher/k3s/k3s.yaml get ns
NAME              STATUS   AGE
default           Active   16h
kube-system       Active   16h
kube-public       Active   16h
kube-node-lease   Active   16h

OS

# cat /etc/redhat-release 
CentOS Linux release 7.9.2009 (Core)

This is a VM with 2 CPUs and 8 GB RAM.

Upvotes: 0

Views: 2747

Answers (1)

RhythmicDevil
RhythmicDevil

Reputation: 845

Was caused by an incompatible file system. This was in the logs.

ERRO[2021-09-24T10:40:28.848795952-04:00] Failed to configure agent: "overlayfs" snapshotter cannot be enabled for "/var/lib/rancher/k3s/agent/containerd", try using "fuse-overlayfs" or "native": /var/lib/rancher/k3s/agent/containerd does not support d_type. If the backing filesystem is xfs, please reformat with ftype=1 to enable d_type support

Upvotes: 0

Related Questions