Kubernetes Security Skill
Harden Kubernetes clusters and workloads through RBAC, pod security, network isolation, secret management, and supply chain controls.
Reference Loading Table
| Signal |
Reference |
Size |
| RBAC, Role, RoleBinding, ClusterRole, ServiceAccount, least-privilege, access control, permissions |
references/rbac-patterns.md |
~60 lines |
| PodSecurity, SecurityContext, runAsNonRoot, readOnlyRootFilesystem, restricted, baseline, image hardening, distroless, Dockerfile |
references/pod-security.md |
~90 lines |
| NetworkPolicy, default-deny, allow-list, egress, ingress, DNS, lateral movement, namespace isolation |
references/network-policies.md |
~70 lines |
| cosign, Kyverno, OPA, admission controller, Sealed Secrets, External Secrets, supply chain, misconfiguration, privileged |
references/supply-chain.md |
~120 lines |
Load greedily. If the user's question touches any signal keyword, load the matching reference before responding. Multiple signals matching = load all matching references.
Phase 1: IDENTIFY
Determine which security domain the user is asking about.
| Domain |
Reference |
| Access control, permissions, roles |
references/rbac-patterns.md |
| Pod hardening, container security |
references/pod-security.md |
| Network isolation, traffic rules |
references/network-policies.md |
| Image signing, secrets, admission control |
references/supply-chain.md |
If the question spans multiple domains, load all relevant references. Most production hardening tasks touch at least RBAC + pod security.
Gate: Domain identified. Reference(s) loaded. Proceed to Phase 2.
Phase 2: RESPOND
Use loaded reference knowledge to answer with concrete YAML manifests and specific configurations. The references contain complete, copy-paste-ready examples for each security domain.
For general Kubernetes debugging, pair with the kubernetes-debugging skill.
Gate: Question answered with reference-backed manifests, not generic advice.
Phase 3: VERIFY
Validate the security posture against the misconfiguration table in references/supply-chain.md. Flag any of the 8 common misconfigurations if present in the user's manifests.
References
1---
2name: kubernetes-security
3description: "Kubernetes security: RBAC, PodSecurity, network policies."
4user-invocable: false
5context: fork
6agent: kubernetes-helm-engineer
7routing:
8 triggers:
9 - "kubernetes security"
10 - "k8s RBAC"
11 - "RBAC setup"
12 - "pod security policy"
13 - "network policy"
14 category: kubernetes
15 pairs_with:
16 - kubernetes-debugging
17 - cobalt-core
18metadata:
19 source: https://skillmd.com/skills/aibot88/kubernetes-security
20---
21
22# Kubernetes Security Skill
23
24Harden Kubernetes clusters and workloads through RBAC, pod security, network isolation, secret management, and supply chain controls.
25
26## Reference Loading Table
27
28| Signal | Reference | Size |
29|--------|-----------|------|
30| RBAC, Role, RoleBinding, ClusterRole, ServiceAccount, least-privilege, access control, permissions | `references/rbac-patterns.md` | ~60 lines |
31| PodSecurity, SecurityContext, runAsNonRoot, readOnlyRootFilesystem, restricted, baseline, image hardening, distroless, Dockerfile | `references/pod-security.md` | ~90 lines |
32| NetworkPolicy, default-deny, allow-list, egress, ingress, DNS, lateral movement, namespace isolation | `references/network-policies.md` | ~70 lines |
33| cosign, Kyverno, OPA, admission controller, Sealed Secrets, External Secrets, supply chain, misconfiguration, privileged | `references/supply-chain.md` | ~120 lines |
34
35**Load greedily.** If the user's question touches any signal keyword, load the matching reference before responding. Multiple signals matching = load all matching references.
36
37---
38
39## Phase 1: IDENTIFY
40
41Determine which security domain the user is asking about.
42
43| Domain | Reference |
44|--------|-----------|
45| Access control, permissions, roles | `references/rbac-patterns.md` |
46| Pod hardening, container security | `references/pod-security.md` |
47| Network isolation, traffic rules | `references/network-policies.md` |
48| Image signing, secrets, admission control | `references/supply-chain.md` |
49
50If the question spans multiple domains, load all relevant references. Most production hardening tasks touch at least RBAC + pod security.
51
52**Gate**: Domain identified. Reference(s) loaded. Proceed to Phase 2.
53
54---
55
56## Phase 2: RESPOND
57
58Use loaded reference knowledge to answer with concrete YAML manifests and specific configurations. The references contain complete, copy-paste-ready examples for each security domain.
59
60For general Kubernetes debugging, pair with the `kubernetes-debugging` skill.
61
62**Gate**: Question answered with reference-backed manifests, not generic advice.
63
64---
65
66## Phase 3: VERIFY
67
68Validate the security posture against the misconfiguration table in `references/supply-chain.md`. Flag any of the 8 common misconfigurations if present in the user's manifests.
69
70---
71
72## References
73
74- [Kubernetes Pod Security Standards](https://kubernetes.io/docs/concepts/security/pod-security-standards/)
75- [Kubernetes Network Policies](https://kubernetes.io/docs/concepts/services-networking/network-policies/)
76- [Kubernetes RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/)
77- [External Secrets Operator](https://external-secrets.io/)
78- [Sealed Secrets](https://github.com/bitnami-labs/sealed-secrets)
79- [Cosign](https://docs.sigstore.dev/cosign/overview/)
80- [Kyverno](https://kyverno.io/)