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
相关推荐
Hello.Reader22 分钟前
Flink Kubernetes HA(高可用)实战原理、前置条件、配置项与数据保留机制
贪心算法·flink·kubernetes
ShiLiu_mtx2 小时前
k8s - 7
云原生·容器·kubernetes
MonkeyKing_sunyuhua5 小时前
docker compose up -d --build 完全使用新代码打包的方法
docker·容器·eureka
醇氧5 小时前
【docker】mysql 8 的健康检查(Health Check)
mysql·docker·容器
匀泪9 小时前
云原生(LVS NAT模式集群实验)
服务器·云原生·lvs
70asunflower9 小时前
用Docker创建不同的容器类型
运维·docker·容器
CodeGolang10 小时前
Docker容器化部署Zabbix监控系统完整指南
docker·容器·zabbix
DolitD10 小时前
云流技术深度剖析:国内云渲染主流技术与开源和海外厂商技术实测对比
功能测试·云原生·开源·云计算·实时云渲染
ghostwritten11 小时前
春节前夕,运维的「年关」:用 Kubeowler 给集群做一次「年终体检」
运维·云原生·kubernetes
[shenhonglei]20 小时前
灰度发布功能需求说明书
kubernetes