The community continues to benefit from kubernetes-the-hard-way
by Kelsey Hightower in understanding how each of the components work together and are configured in a secure manner, step-by-step. In a similar manner but using a slightly different approach, this guide seeks to demonstrate how the security-related settings inside kubernetes
and etcd
actually work from the ground up, one change at a time, validated by real attacks.
By following this guide, you will configure one of the least secure clusters possible at the start. Each step will attempt to follow the pattern of a) educate, b) attack, c) harden, and d) verify in order of security importance and maturity. Upon completion of the guide, you will have successfully hacked your cluster several times over and now fully understand all the necessary configuration changes to prevent each one from ever happening again.
The target audience for this tutorial is someone who has a working knowledge of running a Kubernetes cluster (or has completed the kubernetes-the-hard-way
tutorial) and wants to understand how each security-related setting works at a deep level.
- Ubuntu 16.0.4 LTS
- Docker 1.13.x
- Kubernetes 1.9.2
TODO
TODO
- Etcd
- Master
- Worker1
- Worker2
TODO
- Create the VPC
- Launch and configure the
etcd
instance - Launch and configure the
master
instance - Launch and configure the
worker-1
andworker-2
instance
TODO
TODO
curl etcd endpoint - SG
curl API endpoint - SG
curl Kubelet API - SG
Port scan NodePorts - SG
Port scan - SG
Admin - SG
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
- Delete Instances
- Delete Old Keys and Configs
- Delete VPC