If you are managing you're own cluster you really need a guide like this. It's very easy to create a very insecure cluster. People are actively targeting poorly configured k8s clusters too. It doesn't take to long before you start mining Bitcoin :)
Kubernetes Security – Best Practice Guide
41–45 of 45 posts
Re: Kubernetes Security – Best Practice Guide
#42Security guide is for RHEL6? Nobody is actually running K8s on RHEL6 without systemd, are they? Are they?!?!
It's entertaining that you singled out systemd as the thing that makes it difficult to run Kubernetes on CentOS 6, the init system is by far the easiest part haha. In a standard Kubernetes deployment, the only daemons you really need to have running are dockerd and kubelet, you could feasibly run it without an init system at all, especially now with cri-o. What makes you consider systemd to be important on kubernetes nodes? (FYI: I actually really like systemd, so this isn't a jab at it, I'm just curious)
For a taste of the battle:
- It ships with Kernel 2.6 which is pretty unacceptable in the container world:
-- Supports only a subset of modern namespaces and cgroup controllers
-- Has terrible bugs like containers getting OOM-killed due to the kernel not flushing buffers/cache to disk when the cgroup is running out of memory.
-- It doesn't have overlay2 support and aufs dropped support in 2012.
-- We've been running custom kernels since long before we adopted Kubernetes, so this wasn't a hurdle for us. We currently run a mainline kernel 4.9 with many patches. That said, there are yum repos out there for modern kernels.
- Docker stopped supporting CentOS 6 long ago at version 1.7. That said, they didn't kill off the CentOS 6 build support until the beginning of the moby split in 1.13 so if you were running a custom kernel and an updated iptables beyond 1.4, everything worked. We run 17.06 now, which was much more painful to get building.
- Need to build and upgrade util-linux, e2fsprogs, iproute2, libseccomp, and probably a few others.
So once you've done all that, an init script is the least of your problems lol. CentOS 6 also ships both sysvinit and upstart, so you could write an upstart config instead and get similar enough behavior to systemd.
Re: Kubernetes Security – Best Practice Guide
#43Security guide is for RHEL6? Nobody is actually running K8s on RHEL6 without systemd, are they? Are they?!?!
There is a RHEL7 guide at the predictable url. I've no idea what the differences are.
https://access.redhat.com/documentation/en-us/red_hat_enterp...
Re: Kubernetes Security – Best Practice Guide
#44Earlier quoted context omitted.
How precisely does it provide a secure default configuration. As far as I can tell it enables very few security features built-in to kubernetes (of which there are many not enabled by default or require configuration to properly enable). It's still up to the administrator to secure. Edit: Not to mention your comment doesn't address half the article, which dives into security tangential to kubernetes itself such as AW…
It comes with restrictive PSP equivalents by default. We disable every insecure port on the cluster. End users can’t schedule onto masters or other core infrastructure. Node authorizer is now on by default so nodes are limited in what they can do if a node escape happens. We generate unique certs for all nodes to uniquely identify them. End users can’t directly schedule onto specific nodes, or set endpoints to point…
Re: Kubernetes Security – Best Practice Guide
#45Security guide is for RHEL6? Nobody is actually running K8s on RHEL6 without systemd, are they? Are they?!?!
Hahaha, I actually do run production Kubernetes clusters at work on CentOS 6 so I noticed that too. I suspect they're just posting a general Linux security guide rather than specifically targeting RHEL6 because running Kubernetes on CentOS 6 is really an uphill battle and I can't imagine that many other people embark on that journey. It's entertaining that you singled out systemd as the thing that makes it difficult…
Thanks for the response, and hats off to you for making lemonade in that situation.