1. 개념 : 컨테이너에 대한 권한, 접근제어, 환경설정 기능 기원
2. 사례: Pod에 SecurityContext를 설정하여 모든 컨테이너에서 권한상승 제한
apiVersion: v1
kind: Pod
metadata:
name: security-context-demo
spec:
securityContext:
runAsUser: 1000
runAsGroup: 3000
fsGroup: 2000
volumes:
- name: sec-ctx-vol
emptyDir: {}
containers:
- name: sec-ctx-demo
image: busybox:1.28
command: [ "sh", "-c", "sleep 1h" ]
volumeMounts:
- name: sec-ctx-vol
mountPath: /data/demo
securityContext:
allowPrivilegeEscalation: false
3. Security Context에 포함하는 내용
- UID/GID를 활용한 파일 액세스 제어
- AppArmor : 개별 프로그램 기능 제한
- Seccomp : 프로세스의 시스템 호출 통제
참고 : https://ikcoo.tistory.com/67
24. Security Context
Security Context 참고) 환경 Master Node server OS = CentOS 7 리눅스 커널 버전 : Linux 3.10.0-1062.el7.x86_64 docker version : 1.13.1 api verison : 1.26 Worker Node server OS = CentOS 7 리눅스 커널 버전 : Linux 3.10.0-1062.el7.x86_64 docke
ikcoo.tistory.com
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
Configure a Security Context for a Pod or Container
A security context defines privilege and access control settings for a Pod or Container. Security context settings include, but are not limited to: Discretionary Access Control: Permission to access an object, like a file, is based on user ID (UID) and gro
kubernetes.io
'IT Tech > Cloud Native' 카테고리의 다른 글
쿠버네티스 Audit 기능 (0) | 2023.01.13 |
---|---|
네트워크 정책 (Network Policy) (0) | 2023.01.13 |
Future of Linux Container (0) | 2022.12.27 |
POD (Publish On Demand) (0) | 2022.09.16 |
[CKA] Volume (0) | 2022.03.17 |