etcdctl 恢复k8s后报错

复制代码
Error from server (Forbidden): replicationcontrollers is forbidden: User "system:node:192.168.1.107" cannot list resource "replicationcontrollers" in API group "" in the namespace "harbor"
Error from server (Forbidden): daemonsets.apps is forbidden: User "system:node:192.168.1.107" cannot list resource "daemonsets" in API group "apps" in the namespace "harbor"
Error from server (Forbidden): deployments.apps is forbidden: User "system:node:192.168.1.107" cannot list resource "deployments" in API group "apps" in the namespace "harbor"
Error from server (Forbidden): replicasets.apps is forbidden: User "system:node:192.168.1.107" cannot list resource "replicasets" in API group "apps" in the namespace "harbor"
Error from server (Forbidden): statefulsets.apps is forbidden: User "system:node:192.168.1.107" cannot list resource "statefulsets" in API group "apps" in the namespace "harbor"
Error from server (Forbidden): horizontalpodautoscalers.autoscaling is forbidden: User "system:node:192.168.1.107" cannot list resource "horizontalpodautoscalers" in API group "autoscaling" in the namespace "harbor"
Error from server (Forbidden): cronjobs.batch is forbidden: User "system:node:192.168.1.107" cannot list resource "cronjobs" in API group "batch" in the namespace "harbor"
Error from server (Forbidden): jobs.batch is forbidden: User "system:node:192.168.1.107" cannot list resource "jobs" in API group "batch" in the namespace "harbor"

提示该master节点无权限,应该是在恢复的时候操作不当

在备用master节点上加上

复制代码
kubectl create clusterrolebinding system:node:192.168.1.107   --clusterrole=cluster-admin   --user=system:node:192.168.1.107
相关推荐
小义_1 小时前
【Kubernetes】(十九)监控与升级
云原生·容器·kubernetes
炸炸鱼.2 小时前
Kubernetes Pod 深度理解:从入门到实战
云原生·容器·kubernetes·pod
云游牧者2 小时前
K8S网络策略全解-NetworkPolicy与GlobalNetworkPolicy实战
网络·容器·kubernetes·cni
宇明一不急3 小时前
k8s 常用的正则表达式
云原生·容器·kubernetes
云游牧者4 小时前
K8S-HPA自动扩缩容实战指南
云原生·容器·kubernetes·hpa·弹性伸缩·hpv
念恒123064 小时前
Docker(容器技术发展史)
docker·容器
成为你的宁宁4 小时前
【K8S存储管理:PV/PVC动态供应及NFS动态供给实战】
云原生·容器·kubernetes
容器魔方4 小时前
“驾驭工程”下一跳?JiuwenClaw AgentTeam开启“协同工程”全新范式
人工智能·云原生·容器·架构·开源
YuanDaima20484 小时前
Docker 核心架构与底层技术原理解析
运维·人工智能·docker·微服务·容器·架构·个人开发
liux35284 小时前
Kubernetes v1.27.16 部署 Prometheus + Grafana + Alertmanager 监控体系
kubernetes