Customizing Kubernetes AWS deployment settings

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).

Kubernetes relies on Ubuntu Vivid by default and favors Docker as the container provider. The container storage backend is AUFS which is the common option on Ubuntu.

From a network perspective, Kubernetes uses the well-known subnet for the services while keeping the subnet for the cluster. Interestingly, it automatically adds the 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/ 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:

I usually leave the other settings as-is because they suit my requirements. I encourage you to review the 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.

One thought on “Customizing Kubernetes AWS deployment settings”

Leave a Reply

Your email address will not be published. Required fields are marked *