/cybersecurity-skills-zh:implementing-rbac-for-kubernetes-clusterfrom cybersecurity-skills-zh
Configures Kubernetes RBAC with Role/ClusterRole design, RoleBinding setup, service account security, namespace isolation, and audit logging for multi-tenant clusters.
Ships in cybersecurity-skills-zh. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
配置 Kubernetes 基于角色的访问控制(RBAC),对集群资源强制执行最小权限访问。涵盖 Role/ClusterRole 设计、RoleBinding 配置、服务账户安全、命名空间隔离,以及多租户 Kubernetes 环境的审计日志。
get、list、watch:只读操作create、update、patch:写操作delete、deletecollection:破坏性操作impersonate:模拟其他用户身份escalate:修改 RBAC 角色(高度特权)bind:创建 RoleBinding(高度特权)--authorization-mode=RBAC# 开发者角色 - 命名空间范围
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: app-team
name: developer
rules:
- apiGroups: ["", "apps", "batch"]
resources: ["pods", "deployments", "services", "configmaps", "jobs"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list"] # 可读取但限制创建/更新
- apiGroups: [""]
resources: ["pods/log", "pods/exec"]
verbs: ["get", "create"]
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: developer-binding
namespace: app-team
subjects:
- kind: Group
name: "dev-team"
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: Role
name: developer
apiGroup: rbac.authorization.k8s.io
| 控制项 | NIST 800-53 | 描述 |
|---|---|---|
| 访问控制 | AC-3 | RBAC 强制执行 |
| 最小权限 | AC-6 | 最小必要 Kubernetes 权限 |
| 账户管理 | AC-2 | 服务账户生命周期 |
| 审计 | AU-3 | Kubernetes 审计日志 |
| 职责分离 | AC-5 | 命名空间隔离 |
kubectl auth can-i 验证每个人员的预期权限What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub killvxk/cybersecurity-skills-zh --plugin cybersecurity-skills-zh735 skills in this plugin
/acquiring-disk-image-with-dd-and-dcfldd使用 dd 和 dcfldd 创建取证级逐位磁盘镜像,通过哈希验证保持证据完整性。/analyzing-active-directory-acl-abuse使用 ldap3 检测 Active Directory 中危险的 ACL 配置错误,识别 GenericAll、WriteDACL 和 WriteOwner 等滥用路径/analyzing-android-malware-with-apktool使用 apktool 进行反编译、jadx 恢复 Java 源码、androguard 进行权限分析,对 Android APK 恶意软件样本执行静态分析,包括清单检查和可疑 API 调用检测。Other plugins' skills for the same job