kubectl get pods报错
Jan 14 12:20:33 k8smaster01 kube-controller-manager: I0114 12:20:33.301483    8247 event.go:217] Event(api.ObjectReference{Kind:"ReplicaSet", Namespace:"default", Name:"nginx-3449338310", UID:"266290c2-36f2-11ea-a28e-000c299594c3", APIVersion:"extensions", ResourceVersion:"673", FieldPath:""}): type: 'Warning' reason: 'FailedCreate' Error creating: No API token found for service account "default", retry after the token is automatically created and added to the service account


解决办法:
编辑/etc/kubernetes/apiserver 去除 KUBE_ADMISSION_CONTROL中的SecurityContextDeny,ServiceAccount,并重启kube-apiserver.service服务

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐