我按照here的说明安装了k3s。我也看了这个tutorial。在这两种情况下,都会显示在安装后运行此命令:
k3s kubectl get node然而,当我这样做时,我会得到这样的结果:
# k3s kubectl get node
No resources found这不能工作的原因是什么呢?
如果我指定Rancher创建的kubeconfig文件,我会得到相同的响应。
# kubectl --kubeconfig /etc/rancher/k3s/k3s.yaml get node
No resources found我相信集群正在运行:
# 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'.服务和命名空间
# 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操作系统
# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)这是一个具有2个CPU和8 GB RAM的虚拟机。
发布于 2021-09-24 18:53:37
是由不兼容的文件系统引起的。日志里有这个。
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 supporthttps://stackoverflow.com/questions/69306200
复制相似问题