Kubernetes provides a nice script to quickly deploy a small cluster on various infrastructure backends. On AWS, the documentation is a tad short about detailing how to customize the installation.
By default, Kubernetes is deployed on the Oregon availability zone (us-west-2a) with a cluster size of four minions driven by a single master. The EC2 instances for the minions and their master have a fairly limited size (t2.micro).
From a network perspective, Kubernetes uses the well-known 10.0.0.0/16 subnet for the services while keeping the 10.244.0.0/16 subnet for the cluster. Interestingly, it automatically adds the 10.0.0.0/8 subnet as an insecure registry so that you can more easily deploy Docker images hosted on a private registry.
Kubernetes relies on adding EC2 EBS volumes to extend the instances default storage. It will, in fact, use that storage to host container images. The default settings rely on a 32gb general purpose SSD volumes for the minions. The master receives smaller volumes but doesn’t require much in the first place.
Finally, the script enables, by default, node and cluster logging (through elasticsearch and kibana) as well as cluster monitoring (via influxDB). Once completed the deployment process, the script kindly tells you where to access those services.
All of these settings are kept inside the cluster/aws/config-default.sh resource found in the Kubernetes release. By overriding them before running the deployment script provided by the Kubernetes team, you can easily customize your Kubernetes cluster on AWS.
For instance, this is my development setup:
# Working from Europe
# Using slightly more capable machines while keeping a tight leash over costs
I usually leave the other settings as-is because they suit my requirements. I encourage you to review the config-default.sh script to change other values.
Save your settings in a shell script sourced from your ~/.bashrc script and run the installation command given in the Kubernetes documentation.