AWS GPU: Create the Management Cluster
After the GPU compatible image is created with KIB, a cluster can be generated using that custom AMI.
Name Your Cluster
The cluster name may only contain the following characters: a-z
, 0-9
, .
, and -
. Cluster creation will fail if the name has capital letters. See Kubernetes for more naming information.
By default, the control-plane Nodes will be created in 3 different zones. However, the default worker Nodes will reside in a single Availability Zone. You may create additional node pools in other Availability Zones with the dkp create nodepool
command.
Follow these steps:
Give your cluster a unique name suitable for your environment.
In AWS it is critical that the name is unique, as no two clusters in the same AWS account can have the same name.
Set the environment variable:
export CLUSTER_NAME=<aws-example>
Create a New AWS Kubernetes Cluster
If you use these instructions to create a cluster on AWS using the DKP default settings without any edits to configuration files or additional flags, your cluster is deployed on an Ubuntu 20.04 operating system image with 3 control plane nodes, and 4 worker nodes.
The default AWS image is not recommended for use in production. D2iQ suggests using Konvoy Image Builder to create a custom AMI and take advantage of enhanced cluster operations.
Create a Kubernetes cluster with the command(s) below:
DKP uses local static provisioner as the default storage provider. However, localvolumeprovisioner
is not suitable for production use. You should use a Kubernetes CSI compatible storage that is suitable for production.
You can choose from any of the storage options available for Kubernetes. To disable the default that Konvoy deploys, set the default StorageClasslocalvolumeprovisioner
as non-default. Then set your newly created StorageClass to be the default by following the commands in the Kubernetes documentation called Changing the Default Storage Class.
Execute this command to create a cluster with a GPU AMI and
--self-managed
flag. A self-managed cluster refers to one in which the CAPI resources and controllers that describe and manage it are running on the same cluster they are managing:dkp create cluster aws \ --cluster-name=${CLUSTER_NAME} \ --with-aws-bootstrap-credentials=true \ --self-managed
CODECreate the node pool after cluster creation:
dkp create nodepool aws -c ${CLUSTER_NAME} \ --instance-type p2.xlarge \ --ami-id=${AMI_ID_FROM_KIB} \ --replicas=1 ${NODEPOOL_NAME} \ --kubeconfig=${CLUSTER_NAME}.conf
CODE
As part of the underlying processing using the, the DKP CLI:
creates a bootstrap cluster
creates a workload cluster
moves CAPI controllers from the bootstrap cluster to the workload cluster, making it self-managed
deletes the bootstrap cluster
To understand how this process works step by step, you can find a customizable Create a New AWS Cluster under Additional Infrastructure Configuration.
Cluster Verification
If you want to monitor or verify the installation of your clusters, refer to:
Verify your Cluster and DKP Installation.