Skip to main content
Skip table of contents

AWS Custom AMI

To use a custom AMI when creating your cluster, you must create that AMI using Konvoy Image Builder(KIB) first.

Then perform the export and name the custom AMI for use in the command dkp create cluster after this step:

CODE
export AWS_AMI_ID=ami-<ami-id-here>

IMPORTANT: The AMI must be created with Konvoy Image Builder in order to use the registry mirror feature.

Set the environment variable for the AMI you choose during the dkp create cluster command. This will output the generated manifest into a new file as shown in the example command:

CODE
dkp create cluster aws --cluster-name=${CLUSTER_NAME} \ 
--ami=${AWS_AMI_ID} \ 
--dry-run \ 
--output=yaml \ 
> ${CLUSTER_NAME}.yaml

This step will be performed during both AWS Install in a Non-air-gapped Environment and AWS Install in an Air-gapped Environment and explained prior to cluster creation on a page in both of those scenarios:

There are two approaches to supplying the ID of your AMI during cluster creation. Either provide the ID of the AMI or provide a way for DKP to discover the AMI using location, format and OS information:

  1. Option One - Provide the ID of your AMI:

    1. Use the example command below leaving the existing flag that provides the AMI ID: --ami AMI_ID

  2. Option Two - Provide a path for your AMI with the information required for image discover:

    1. Where the AMI is published using your AWS Account ID: --ami-owner AWS_ACCOUNT_ID

    2. The format or string used to search for matching AMIs and ensure it references the Kubernetes version plus the base OS name: --ami-base-os ubuntu-20.04

    3. The base OS information: --ami-format 'example-{{.BaseOS}}-?{{.K8sVersion}}-*'

DKP uses AWS CSI as the default storage provider. You can use a Kubernetes CSI compatible storage solution that is suitable for production. See the Kubernetes documentation called Changing the Default Storage Class for more information.

  1. Run this command to create your Kubernetes cluster using any relevant flags for Option One explained above:

    CODE
    dkp create cluster aws \
    --cluster-name=${CLUSTER_NAME} \
    --additional-tags=owner=$(whoami) \
    --with-aws-bootstrap-credentials=true \
    --ami AMI_ID \
    --self-managed

    OR

  2. Option Two is to run the command as shown from the explanation above:

    CODE
    dkp create cluster aws \
    --cluster-name=${CLUSTER_NAME} \
    --additional-tags=owner=$(whoami) \
    --with-aws-bootstrap-credentials=true \
    --ami-owner AWS_ACCOUNT_ID \
    --ami-base-os ubuntu-20.04 \
    --ami-format 'example-{{.BaseOS}}-?{{.K8sVersion}}-*' \
    --self-managed

Next Topic

AWS Registry Mirrors

JavaScript errors detected

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

If this problem persists, please contact our support.