kubernetes-hardening
하는 일
이 도구는 Kubernetes 환경을 더 안전하게 만드는 데 도움을 줍니다. 승인되지 않은 접근과 위험한 동작으로부터 애플리케이션과 클러스터 자체를 보호하는 규칙을 설정합니다.
사용하는 경우
- ✓새 Kubernetes 클러스터를 설정할 때.
- ✓Kubernetes에서 실행되는 애플리케이션을 보호해야 할 때.
- ✓보안 및 규정 준수 요구 사항을 충족해야 하는 경우.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/kubernetes-hardening/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“'production' 네임스페이스에 제한된 보안 정책을 사용하도록 Kubernetes를 설정해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
'Pod Security Standards'와 'Network Policies'라는 설정을 적용합니다. 이 설정은 애플리케이션이 할 수 있는 것과 할 수 없는 것, 그리고 서로 및 외부와 어떻게 통신할 수 있는지를 정의합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Kubernetes Hardening
Secure Kubernetes clusters and workloads.
When to Use This Skill
Use this skill when:
- Hardening Kubernetes clusters
- Implementing Pod Security Standards
- Configuring network policies
- Meeting security compliance
Scope and validation
Confirm the exact cluster/namespace/version and authorized writes before applying policies. Examples are fragments: validate the reviewed image, namespace, service accounts, labels and required runtime storage. Pin the policy version to the target Kubernetes release where supported. Restricted admission controls new/updated pods; it does not retroactively fix running workloads or establish compliance.
Pod Security Standards
# Namespace with restricted policy
apiVersion: v1
kind: Namespace
metadata:
name: production
labels:
pod-security.kubernetes.io/enforce: restricted
pod-security.kubernetes.io/audit: restricted
pod-security.kubernetes.io/warn: restricted
Security Context
apiVersion: v1
kind: Pod
metadata:
name: secure-pod
labels:
app: web
spec:
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
seccompProfile:
type: RuntimeDefault
containers:
- name: app
image: registry.example.invalid/myapp:REVIEWED_IMMUTABLE_TAG
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
Network Policies
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-all
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-web
spec:
podSelector:
matchLabels:
app: web
ingress:
- from:
- podSelector:
matchLabels:
app: frontend
ports:
- port: 8080
RBAC
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: app-reader
rules:
- apiGroups: [""]
resources: ["pods", "services"]
verbs: ["get", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: app-reader-binding
subjects:
- kind: ServiceAccount
name: myapp
roleRef:
kind: Role
name: app-reader
apiGroup: rbac.authorization.k8s.io
Best Practices
- Enable Pod Security Standards
- Implement network policies
- Use RBAC with least privilege
- Enable audit logging
- Secure etcd with encryption
- Use service mesh for mTLS
- Regular security scanning
Related Skills
- kubernetes-ops (
kubernetes-ops) - K8s operations - container-hardening (
container-hardening) - Container security
Limitations
- Apply guidance only within authorized scope; test destructive steps in non-production first.
- Docs-only import: upstream scripts and templates not bundled.
Example
# Read-only first: inventory before any active step.
which <tool> && <tool> --help | head -n 20
Adapted from BagelHole/DevOps-Security-Agent-Skills (MIT); frontmatter, When to Use/Limitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.
NetworkPolicy enforcement requires a supporting CNI. The default-deny example also blocks DNS and dependencies until narrowly scoped rules are added; same-namespace pod selectors do not authorize arbitrary namespaces. Test allowed and denied flows from the real source identities and preserve recovery access. readOnlyRootFilesystem may require bounded writable temporary volumes; do not disable it blindly after a startup error. Kubernetes NetworkPolicy behavior.
자주 묻는 질문
'Pod Security Standards'란 무엇인가요?
Kubernetes 클러스터 안에서 실행되는 컨테이너의 보안 수준을 정하는 규칙 집합입니다. 예를 들어 관리자 권한으로 실행되지 않도록 막습니다.
'Network Policies'란 무엇인가요?
클러스터 안의 방화벽과 같습니다. 컨테이너 사이와 클러스터 밖으로 오가는 네트워크 트래픽을 통제해, 필요한 통신만 일어나도록 합니다.
이 도구가 이미 실행 중인 애플리케이션의 보안 문제를 자동으로 고치나요?
새 보안 규칙을 적용하지만, 이미 실행 중인 애플리케이션의 문제를 자동으로 고치지는 않습니다. 운영 환경에 적용하기 전에 변경 사항을 테스트하는 것이 중요합니다.
상세 정보
작성자의 원본 설명
Implement Kubernetes security contexts, Pod Security Standards, and network policies.
인기도
- GitHub 스타
- 48k
- 순위
- #5017
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.