Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I add a DMZ in front of Kubernetes?

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 ?

Thanks.

like image 720
Guillaume Avatar asked Oct 12 '18 14:10

Guillaume


1 Answers

This is an opinion question so I'll answer with an option.

It's very secure if you follow standard security practices for your cluster. But nothing is 100% secure. So adding a DMZ would help reduce your attack vectors.

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.

As for your pods and workloads, you can increase security (at some performance cost) using things like a well-crafted seccomp profile and or adding the right capabilities in your pod security context. You can also add more security with AppArmor or SELinux, but lots of people don't since it can get very complicated.

There are also other alternatives to Docker in order to more easily sandbox your pods (still early in their lifecycle as of this writing): Kata Containers, Nabla Containers and gVisor.

like image 128
Rico Avatar answered Oct 20 '22 00:10

Rico