↑ Return to Products and Services

EC2 CentOS 8.2 Kubernetes HVM

This Amazon Machine Image (AMI) is an EBS backed HVM image of CentOS 8.2 Linux operating system, with Kubernetes and automatic configuration.  Launch the one instance to start, this is your cluster master.  Ensure you launch the master with a public IP address so you can log in an check status of the cluster as you are building it out.  Note the public IP address of the new instance, denoted as ‘public_ip’ below.

Launch 1 instance –  this is master0.  Once running, log in and run commands:

  1. ssh ec2-user@public_ip
  2. sudo chown ec2-user:ec2-user /etc/kubernetes/admin.conf
  3. kubectl get nodes

The master status will be ‘Ready’ when ready to add more nodes (example below):

NAME                     STATUS   ROLES    AGE   VERSION
ip-192-168-10-71   Ready    master   2m   v1.19.2

When in Ready status, launch 1 or more worker instances.  When launching enter the Private IP address of the master into the ‘user data’ text box of the EC2 launch wizard.  Ensure these nodes also have a public IP address as worker nodes will be where you deploy containers, often via Helm Charts.  Continue to re-run ‘kubectl get nodes’ until you see all nodes in Ready state.  In the example below, 2 workers were launched::

NAME                       STATUS   ROLES    AGE     VERSION

ip-192-168-10-198   Ready    <none>   3m23s   v1.19.2

ip-192-168-10-206   Ready    <none>   3m7s    v1.19.2

ip-192-168-10-71     Ready    master   37m     v1.19.2


OPTIONAL:  Worker nodes are not tagged with ‘worker’ roles in this implementation.  Worker nodes can be tagged, if desired.  Specify the name of the node you wish to edit:

4. kubectl edit nodes ip-192-168-10-198

Add the following to the ‘labels’ section (USE SAME INDENTATION SPACING AS OTHER LABLES IN THAT SECTION):

node-role.kubernetes.io/worker: “”

ADDITIONALLY: Each worker comes with persistent volumes pre-configured on a separate 10Gb external EBS LVM drive for easy expansion, as needed.