AWS Using Konvoy Image Builder
You must have at least one image before creating a new cluster. As long as you have an image, this step in your configuration is not required each time since that image can be used to spin up a new cluster. However, if you need different images for different environments or providers, you will need to create a new custom image. Inside the sections for either Non-air-gapped or Air-gapped install, you will find the instructions for how to create and apply custom images during cluster creation.
The following section describes how to use Konvoy Image Builder (KIB) with Amazon Web Services (AWS).
Konvoy Image Builder has a more detailed section in the documentation if you need to refer there for compatible versions with DKP and other specific information.
Learn how to build a custom AMI for use with DKP
AMI images contain configuration information and software to create a specific, pre-configured, operating environment. For example, you can create an AMI image of your current computer system settings and software. The AMI image can then be replicated and distributed, creating your computer system for other users. You can use overrides files to customize some of the components installed on your machine image. For example, you could tell KIB to install the FIPS versions of the Kubernetes components.
This procedure describes how to use the Konvoy Image Builder (KIB) to create a Cluster API compliant Amazon Machine Image (AMI). KIB uses variable overrides to specify base image and container images to use in your new AMI.
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.
Prerequisites
Before you begin, you must:
Download the KIB bundle for your version of DKP prefixed with
konvoy-image-bundle
for your OS.Check the Supported Kubernetes Version for your Provider.
Create a working registry:
Version 4.0 of Podman or higher for Linux. Host requirements found here: https://kind.sigs.k8s.io/docs/user/rootless/#host-requirements
Version 20.10.0 of Docker or higher for Linux or MacOS
Ensure you have met the minimal set of permissions from the AWS Image Builder Book.
A Minimal IAM Permissions for KIB to create an Image for an AWS account using Konvoy Image Builder.
Extract KIB Bundle
If not done previously during Konvoy Image Builder download in prerequisites, extract the bundle and cd
into the extracted konvoy-image-bundle-$VERSION
folder. Otherwise, proceed with creating the image. The bundled version of konvoy-image
contains an embedded docker
image that contains all the requirements for building.
The konvoy-image
binary and all supporting folders are also extracted. When run, konvoy-image
bind mounts the current working directory (${PWD}
) into the container to be used.
Set environment variables for AWS access. The following variables must be set using your credentials including required IAM:
CODEexport AWS_ACCESS_KEY_ID export AWS_SECRET_ACCESS_KEY export AWS_DEFAULT_REGION
If you have an override file to configure specific attributes of your AMI file, add it. Instructions for customizing an override file are found on this page: Image Overrides
Inside the sections for either Non-air-gapped or Air-gapped cluster creation, you will find the instructions for how to apply custom images.