Skip to main content
Skip table of contents

AWS Image Integrated with DKP CLI

This procedure describes how to create a Cluster API compliant Amazon Machine Image (AMI).

A customized image requires the Konvoy Image Builder tool to be downloaded and use variable overrides to specify the base image and container images to use in your new AMI. To create a custom AMI and take advantage of enhanced cluster operations, explore the Using KIB with AWS topics for more options.

In previous DKP releases, AMI images provided by the upstream CAPA project would be used if you did not specify an AMI. However, the upstream images are not recommended for production and may not always be available.   Therefore, DKP now requires you to specify an AMI when creating a cluster. To create an AMI, use Konvoy Image Builder. A customized image requires the Konvoy Image Builder tool to be downloaded where you can use variable overrides to specify the base image and container images for use in your new custom AMI.

Prerequisites

Before you begin, you must:

Build the Image

Depending on which version of DKP you are running, steps and flags will be different.

Execute the following to begin image creation:

Run the dkp-image-builder create command to build and validate the image.

CODE
dkp-image-builder create image aws/centos-79.yaml

By default it builds in the us-west-2 region. to specify another region set the --region flag:

CODE
dkp-image-builder create image aws --region us-east-1 images/ami/centos-79.yaml

Once DKP provisions the image successfully, the ami id is printed and written to the packer.pkr.hcl file. This file has an artifact_id field whose value provides the name of the AMI ID as shown in the example below:

CODE
{
      "name": "rhel-7.9-fips",
      "builder_type": "amazon-ebs",
      "build_time": 1659486130,
      "files": null,
      "artifact_id": "us-west-2:ami-0f2ef742482e1b829",
      "packer_run_uuid": "0ca500d9-a5f0-815c-6f12-aceb4d46645b",
      "custom_data": {
        "containerd_version": "",
        "distribution": "RHEL",
        "distribution_version": "7.9",
        "kubernetes_cni_version": "",
        "kubernetes_version": "1.24.5+fips.0"
      }
    }

Next Step:

Create a Custom AMI

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.