Deploy an Ubuntu Pro EKS cluster - using Pro tokens

This guide shows how to deploy an EKS cluster with Ubuntu Pro nodes using Ubuntu Pro tokens and EC2 launch templates.


You need:

  • eksctl: Check the instructions to install eksctl

  • packer: only needed if you want to enable FIPS for the cluster nodes. Install it with sudo snap install packer

  • your AWS access key ID and secret access key

  • an Ubuntu Pro token

Prepare the cluster for deployment

Although Ubuntu Pro for EKS is available as an AMI for Ubuntu 22.04 LTS (see Deploy an Ubuntu Pro EKS cluster - using a Pro AMI), there is no such EKS related offer available for Ubuntu 20.04 LTS. So to use Pro in 20.04 LTS, you need to provision the EKS cluster with customised Ubuntu nodes.

The steps needed for deploying the cluster depend on whether you need to enable FIPS or not.

When FIPS is not enabled, you can use one of the existing Ubuntu EKS AMIs and customise it using cloud-init’s ubuntu-advantage module during deployment.

For this deployment, you’ll also need to have an existing launch template on AWS.

Update user-data in launch template

On the advanced section of your launch template (user-data section), copy the following code (replacing the “token” field with your Pro token):

MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="==MYBOUNDARY=="

Content-Type: text/cloud-config; charset="us-ascii"
token: <pro_token>
- esm

Content-Type: text/x-shellscript; charset="us-ascii"

sudo /etc/eks/ procluster


Cloud-init will use this user-data to enable ESM on the cluster nodes and bootstrap the AWS EKS cluster.

Create the eksctl config file

You’re now ready to deploy the EKS cluster with Ubuntu Pro nodes. To do so, start by creating a cluster.yaml with the following content

kind: ClusterConfig
name: procluster
region: us-east-1

Add the following content to your file

- name: ng-procluster
desiredCapacity: 2
  id: lt-12345
  version: "1"

This config file will allow you to create an EKS cluster using the launch template from above, with two nodes.

For further cluster customisation check out eksctl details.

Create the EKS cluster

To create the EKS cluster, run eksctl create cluster -f cluster.yaml (you might need to specify the --profile option if you have multiple profiles). When this command finishes, see the nodes with

$ kubectl get nodes

NAME                                           STATUS   ROLES    AGE     VERSION   Ready    <none>   2m45s   v1.23.x     Ready    <none>   2m45s   v1.23.x

(Optional) Verify Pro subscription

To check that the deployed nodes have Ubuntu Pro, run:

$ aws --region <region_name> ec2 describe-instances \
      --filters Name=instance-state-name,Values=running \
      --query 'Reservations[*].Instances[*].[InstanceType, LaunchTime, PlatformDetails]'
      --output table

|                       DescribeInstances                      |
|  t3.medium|  2024-05-07T19:57:33+00:00  |  Ubuntu Pro Linux  |
|  t3.medium|  2024-05-07T19:57:33+00:00  |  Ubuntu Pro Linux  |