Interview › Security & DevSecOps
How do you secure container runtime (seccomp, AppArmor, capabilities, read-only root)? [Advanced]
Answer
I secure container runtime by reducing privileges and attack surface: run as non-root, drop Linux capabilities, use seccomp/AppArmor/SELinux profiles, set read-only root filesystems, avoid privileged mode, restrict host namespaces and hostPath mounts, and keep images minimal and patched.
Technical explanation
Runtime security starts in the Dockerfile and Kubernetes securityContext.
seccomp limits syscalls, AppArmor/SELinux enforce mandatory access controls, and capabilities control fine-grained root privileges.
Read-only filesystems and no-root execution make post-exploitation harder.
Hands-on example
Kubernetes securityContext:
securityContext:
runAsNonRoot: true
runAsUser: 10001
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
seccompProfile:
type: RuntimeDefault
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Security & DevSecOps interview questions
- What are Linux capabilities, and why drop them in containers? [Advanced]
- What is the difference between authentication and authorization? [Advanced]
- What is certificate management, and how do tools like cert-manager help? [Advanced]
- What are Kubernetes Pod Security Standards (privileged, baseline, restricted)? [Advanced]
- How do you prevent privilege escalation in a Kubernetes cluster? [Advanced]
- What is the difference between symmetric and asymmetric encryption? [Advanced]
- What is encryption at rest versus in transit, and how do you ensure both? [Advanced]
- What is the difference between encoding, encryption, and hashing? [Advanced]