【问题标题】:Basic install of k3s has no nodesk3s的基本安装没有节点
【发布时间】:2021-09-23 19:54:04
【问题描述】:

我按照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 的 VM。

【问题讨论】:

    标签: k3s


    【解决方案1】:

    是由不兼容的文件系统引起的。这在日志中。

    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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-08-13
      • 1970-01-01
      • 2021-09-30
      • 2022-12-08
      • 1970-01-01
      • 2020-04-26
      • 2019-12-23
      相关资源
      最近更新 更多