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
相关推荐
阿里云云原生21 小时前
深入内核:拆解 OpenTelemetry eBPF 探针如何优雅地“透视”多语言微服务?
云原生
2601_961875241 天前
决战申论100题2026|最新|范文
linux·容器·centos·debian·ssh·fabric·vagrant
java_cj1 天前
深入kube-apiserver认证机制:从Bearer Token到mTLS的完整认证链解析
linux·运维·服务器·云原生·容器·kubernetes
程序员老赵1 天前
服务器没有桌面?Docker 跑个 Chrome,浏览器就能远程用
docker·容器·devops
正经教主1 天前
【docker基础】 第八周:容器监控与应用更新策略
运维·docker·容器
kiros_wang1 天前
Docker 使用完整指南
运维·docker·容器
正经教主1 天前
【docker基础】第九周:Docker安全与镜像优化
运维·docker·容器
qq_452396231 天前
第十三篇:《K8s 安全基础:RBAC、ServiceAccount、Pod Security》
java·安全·kubernetes
睡不醒男孩0308231 天前
云原生运维实战:高并发架构下的云原生可观测性、韧性降级与自动化干预体系
数据库·kubernetes·高并发·prometheus·devops·sre·缓存调优
qq_452396231 天前
第十四篇:《K8s 网络模型与 CNI 插件(Calico、Flannel、Cilium)》
网络·kubernetes·php