Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 |
Tags
- Python
- DevOps
- POD
- AZURE
- cpu
- kubelet
- asyncio
- leetcode
- elasticsearch
- ansible
- EC2
- RBAC
- Network
- IAC
- Django
- terraform
- AWS
- docker
- kernel
- Service
- dockerfile
- CKS
- Kubernetes
- Role
- AZ-900
- Deployment
- ebs
- K8S
- FastAPI
- IAM
Archives
- Today
- Total
궁금한게 많은 개발자 노트
[ K8S ] CKS - Seccomp Profile 본문
Create a pod named audit-pod in the default namespace using the nginx image. Ensure that the pod uses the seccomp profile located at /var/lib/kubelet/seccomp/profiles/audit.json on the worker node.
[ 포함된 개념 ]
- Seccomp(Secure Computing Mode): 리눅스 커널 기능으로, 컨테이너가 사용할 수 있는 시스템 콜을 제한합니다.
- 컨테이너 프로세스 > 시스템 콜 호출 > Seccomp 필터 평가 > 허용 or 거부
- profile file인 audit.json에 허용/거부할 시스템콜 목록을 정의
- Seccomp 프로파일 타입
- Unconfined > seccomp 비활성화 (기본값)
- RuntimeDefault > 컨테이너 런타임 기본 프로파일
- Localhost > 노드 로컬 파일 사용
- seccompProfile 위치: Pod 수준 vs 컨테이너 수준 주의
- 상대 경로 주의: K8S에서 Seccomp프로필을 지정할 때는 노드의 절대 경로가 아니라, Kubelet의 기본 경로인 /var/lib/kubelet/seccomp/를 제외한 상대 경로만 작성해야 함
[ 풀이 방법 ]
# pod yaml생성
$ kubectl run audit-pod --image=nginx --dry-run=client -o yaml > seccomp-pod.yaml
$ vi seccomp.yaml
apiVersion: v1
kind: Pod
metadata:
name: audit-pod
spec:
securityContext:
seccompProfile:
type: Localhost
localhostProfile: profiles/audit.json # /var/lib/kubelet/seccomp/ 이후의 경로만 작성!
containers:
- name: audit-pod
image: nginx
$ kubectl apply -f seccomp.yaml'DevOps > CKS' 카테고리의 다른 글
| [ K8S ] CKS - Secret Resource EncryptionConfiguration (0) | 2026.03.26 |
|---|---|
| [ K8S ] CKS - PSA (Pod Security Admission) (0) | 2026.03.25 |
| [ K8S ] CKS - API Server TroubleShooting (Node Resctriction, RBAC) (0) | 2026.03.25 |
| [ K8S ] CKS - Falco Rule 작성 및 위협 파드 조치 (0) | 2026.03.25 |
| [ K8S ] CKS - Pod Security Context & BOM추출 (0) | 2026.03.24 |
Comments