본문으로 건너뛰기
cccskills
무료GitHub에 공개

k8s-security

Audit Kubernetes RBAC, enforce policies, and manage secrets. Use for security reviews, permission audits, policy enforcement with Kyverno/Gatekeeper, and secret management.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Kubernetes
설치 방법 보기

포함된 파일(3)

  • SKILL.md4.6 KB
  • RBAC-PATTERNS.md4.0 KB
  • scripts/audit-rbac.py6.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Kubernetes Security

Security auditing, RBAC management, and policy enforcement using kubectl-mcp-server tools.

When to Apply

Use this skill when:

  • User mentions: "security", "RBAC", "permissions", "policy", "audit", "secrets"
  • Operations: security review, permission check, policy enforcement
  • Keywords: "who can", "access control", "compliance", "vulnerable"

Priority Rules

PriorityRuleImpactTools
1Check cluster-admin bindings firstCRITICALget_cluster_role_bindings
2Audit secrets access permissionsCRITICALReview role rules
3Verify network isolationHIGHget_network_policies
4Check policy complianceHIGHkyverno_*, gatekeeper_*
5Review pod security contextsMEDIUMdescribe_pod

Quick Reference

TaskToolExample
List rolesget_rolesget_roles(namespace)
Cluster rolesget_cluster_rolesget_cluster_roles()
Role bindingsget_role_bindingsget_role_bindings(namespace)
Service accountsget_service_accountsget_service_accounts(namespace)
Kyverno policieskyverno_clusterpolicies_list_toolkyverno_clusterpolicies_list_tool()

RBAC Auditing

List Roles and Bindings

get_roles(namespace)
get_cluster_roles()
get_role_bindings(namespace)
get_cluster_role_bindings()

Check Service Account Permissions

get_service_accounts(namespace)

Common RBAC Patterns

PatternRisk LevelCheck
cluster-admin bindingCriticalget_cluster_role_bindings()
Wildcard verbs (*)HighReview role rules
secrets accessHighCheck get/list on secrets
pod/execHighAllows container access

See RBAC-PATTERNS.md for detailed patterns and remediation.

Policy Enforcement

Kyverno Policies

kyverno_policies_list_tool(namespace)
kyverno_clusterpolicies_list_tool()
kyverno_policy_get_tool(name, namespace)

OPA Gatekeeper

gatekeeper_constraints_list_tool()
gatekeeper_constraint_get_tool(kind, name)
gatekeeper_templates_list_tool()

Common Policies to Enforce

PolicyPurpose
Disallow privilegedPrevent root containers
Require resource limitsPrevent resource exhaustion
Restrict host namespacesIsolate from node
Require labelsEnsure metadata
Allowed registriesControl image sources

Secret Management

List Secrets

get_secrets(namespace)

Secret Best Practices

  1. Use external secret managers (Vault, AWS SM)
  2. Encrypt secrets at rest (EncryptionConfiguration)
  3. Limit secret access via RBAC
  4. Rotate secrets regularly

Network Policies

List Policies

get_network_policies(namespace)

Cilium Network Policies

cilium_policies_list_tool(namespace)
cilium_policy_get_tool(name, namespace)

Default Deny Template

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: default-deny-all
spec:
  podSelector: {}
  policyTypes:
  - Ingress
  - Egress

Security Scanning Workflow

  1. RBAC Audit

    get_cluster_role_bindings()
    get_roles(namespace)
    
  2. Policy Compliance

    kyverno_clusterpolicies_list_tool()
    gatekeeper_constraints_list_tool()
    
  3. Network Isolation

    get_network_policies(namespace)
    cilium_endpoints_list_tool(namespace)
    
  4. Pod Security

    get_pods(namespace)
    describe_pod(name, namespace)
    

Multi-Cluster Security

Audit across clusters:

get_cluster_role_bindings(context="production")
get_cluster_role_bindings(context="staging")

Automated Audit Script

For comprehensive security audit, see scripts/audit-rbac.py.

Related Tools

  • RBAC: get_roles, get_cluster_roles, get_role_bindings
  • Policy: kyverno_*, gatekeeper_*
  • Network: get_network_policies, cilium_policies_*
  • Istio: istio_authorizationpolicies_list_tool, istio_peerauthentications_list_tool

Related Skills

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Configure Kubernetes autoscaling with HPA, VPA, and KEDA. Use for horizontal/vertical pod autoscaling, event-driven scaling, and capacity management.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rohitg00/kubectl-mcp-server9642026년 4월 9일 업데이트

Kubernetes backup and restore with Velero. Use when creating backups, restoring applications, managing disaster recovery, or migrating workloads between clusters.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rohitg00/kubectl-mcp-server9642026년 4월 9일 업데이트

Browser automation for Kubernetes dashboards and web UIs. Use when interacting with Kubernetes Dashboard, Grafana, ArgoCD UI, or other web interfaces. Requires MCP_BROWSER_ENABLED=true.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rohitg00/kubectl-mcp-server9642026년 4월 9일 업데이트

k8s-capi

무료

Cluster API lifecycle management for provisioning, scaling, and upgrading Kubernetes clusters. Use when managing cluster infrastructure or multi-cluster operations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rohitg00/kubectl-mcp-server9642026년 4월 9일 업데이트

k8s-certs

무료

Kubernetes certificate management with cert-manager. Use when managing TLS certificates, configuring issuers, or troubleshooting certificate issues.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rohitg00/kubectl-mcp-server9642026년 4월 9일 업데이트

Cilium and Hubble network observability for Kubernetes. Use when managing network policies, observing traffic flows, or troubleshooting connectivity with eBPF-based networking.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rohitg00/kubectl-mcp-server9642026년 4월 9일 업데이트

rohitg00의 스킬 모두 보기

이 스킬의 문제 신고