Skip to main content
Skip table of contents

AWS Naming Cluster

Name Your Cluster

In AWS it is critical that the name is unique, as no two clusters in the same AWS account can have the same name.

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.

Follow these steps:

  1. Give your cluster a unique name suitable for your environment.

  2. Set the environment variable:

CODE
export CLUSTER_NAME=<aws-example>

Cluster Name List in AWS

To get a list of names used in your AWS account, use the aws CLI. After downloading, use the following command:

CODE
aws ec2 describe-vpcs --filter "Name=tag-key,Values=kubernetes.io/cluster" --query "Vpcs[*].Tags[?Key=='kubernetes.io/cluster'].Value | sort(@[*][0])"
CODE
    "alex-aws-cluster-afe98",
    "sam-aws-cluster-8if9q"
  • (Optional) To create a cluster name that is unique, use the following command:

    CODE
    export CLUSTER_NAME=aws-example-$(LC_CTYPE=C tr -dc 'a-z0-9' </dev/urandom | fold -w 5 | head -n1)
    echo $CLUSTER_NAME
    CODE
    aws-example-pf4a3

    This will create a unique name every time you run it, so use it with forethought.

Next Topic

AWS Customizing CAPI Clusters

JavaScript errors detected

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

If this problem persists, please contact our support.