1 개요[ | ]
- 쿠버네티스 Security Context
- Kubernetes 보안 컨텍스트
- Pod 또는 컨테이너의 권한부여, 환경설정 접근을 정의하는 securityContext 필드
- Pod 또는 컨테이너 내의 securityContext 필드는 컨테이너 프로세스들이 사용하는 사용자(runAsUser)와 그룹(fsGroup), 가용량, 권한 설정, 보안 정책(SELinux/AppArmor/Seccomp)을 설정하기 위해 사용된다.
- 런타임 UID, GID를 포함한다.
yaml
Copy
apiVersion: v1
kind: Pod
metadata:
name: security-context-demo
spec:
securityContext:
runAsUser: 1000
fsGroup: 2000
volumes:
- name: sec-ctx-vol
emptyDir: {}
containers:
- name: sec-ctx-demo
image: gcr.io/google-samples/node-hello:1.0
volumeMounts:
- name: sec-ctx-vol
mountPath: /data/demo
securityContext:
allowPrivilegeEscalation: false
2 같이 보기[ | ]
- k8s privileged
- k8s defaultMode
- k8s allowPrivilegeEscalation
- Error: container has runAsNonRoot and image will run as root
3 참고[ | ]
편집자 Jmnote bot Jmnote
로그인하시면 댓글을 쓸 수 있습니다.