<p>Is Kubernetes Ingress secure enough to avoid adding a DMZ in front of Kubernetes to expose Pods and Services ?
What would happen if someone "hacked" into a Pod ?</p>

<p>Thanks.</p>

<p>This is an opinion question so I'll answer with an option.</p>

<p>It's very secure if you follow <a href="https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/" rel="nofollow noreferrer">standard security practices</a> for your cluster. But nothing is 100% secure. So adding a DMZ would help reduce your attack vectors. </p>

<p>In terms of protecting your Ingress from outside, you can limit your access for your external load balancer just to HTTPS, and most people do that but note that HTTPS and your application itself can also have vulnerabilities.</p>

<p>As for your pods and workloads, you can increase security (at some performance cost) using things like a well-crafted <a href="https://github.com/docker/labs/tree/master/security/seccomp" rel="nofollow noreferrer">seccomp</a> profile and or adding the right <a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/" rel="nofollow noreferrer">capabilities</a> in your pod security context. You can also add more security with <a href="https://docs.docker.com/engine/security/apparmor/#load-and-unload-profiles" rel="nofollow noreferrer">AppArmor</a> or <a href="https://www.projectatomic.io/docs/docker-and-selinux/" rel="nofollow noreferrer">SELinux</a>, but lots of people don't since it can get very complicated.</p>

<p>There are also other alternatives to Docker in order to more easily sandbox your pods (still early in their lifecycle as of this writing): <a href="https://katacontainers.io/" rel="nofollow noreferrer">Kata Containers</a>, <a href="https://nabla-containers.github.io/" rel="nofollow noreferrer">Nabla Containers</a> and <a href="https://github.com/google/gvisor" rel="nofollow noreferrer">gVisor</a>.</p>
