在这里插入图片描述
coredns describe该pod无有用信息

logs日志如下

[INFO] plugin/ready: Still waiting on: "kubernetes"
[INFO] plugin/ready: Still waiting on: "kubernetes"
[INFO] plugin/ready: Still waiting on: "kubernetes"
[INFO] plugin/ready: Still waiting on: "kubernetes"
E1126 02:25:44.674787       1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.20.2/tools/cache/reflector.go:167: Failed to watch *v1beta1.EndpointSlice: failed to list *v1beta1.EndpointSlice: endpointslices.discovery.k8s.io is forbidden: User "system:serviceaccount:kube-system:coredns" cannot list resource "endpointslices" in API group "discovery.k8s.io" at the cluster scope

翻译内容:*v1beta1.EndpointSlice:endpointslices.discovery.k8s.io被禁止:用户“系统:服务帐户:kube系统:coredns”无法列出API组中的资源“endpointslices”集群范围内的“discovery.k8s.io”

[信息]插件/准备就绪:仍在等待:“kubernetes”

Google查询报错

是coredns的一个bug, 需要修改coredns角色权限

kubectl edit clusterrole system:coredns

最后追加

- apiGroups:
  - discovery.k8s.io
  resources:
  - endpointslices
  verbs:
  - list
  - watch

修复后
在这里插入图片描述

Logo

开源、云原生的融合云平台

更多推荐