Search⌘ K

Preparing for the Cluster Setup: Availability Zones and SSH Keys

Explore how to select availability zones in AWS and generate SSH keys essential for secure access while preparing to build a production-ready Kubernetes cluster. Understand best practices for environment setup that ensures cluster availability and security.

Setting up the availability zones

In this lesson, we will decide which availability zones we should use. So, let’s look at what’s available in the us-east-2 region:

Shell
aws ec2 describe-availability-zones \
--region $AWS_DEFAULT_REGION

The output is as follows:

Shell
{
"AvailabilityZones": [
{
"State": "available",
"RegionName": "us-east-2",
"Messages": [],
"ZoneID": "use2-az1",
"ZoneName": "us-east-2a"
},
{
"State": "available",
"RegionName": "us-east-2",
"Messages": [],
"ZoneID": "use2-az2",
"ZoneName": "us-east-2b"
},
{
"State": "available",
"RegionName": "us-east-2",
"Messages": [],
"ZoneID": "use2-az3",
"ZoneName": "us-east-2c"
}
]
}

As we can see, the region has three availability zones. We’ll store them in an environment variable.

Note: Windows users should use tr '\r\n' ', ' instead of tr '\n' ',' in the following command: ...