fbpx

Prepare your Route53

Configure your DNS as a sub-hosted zone under a Route53 domain

Example:  amiram.ek8s.com  (reference commands)

ID=$(uuidgen) && aws route53 create-hosted-zone --name amiram.ek8s.com --caller-reference $ID | jq .DelegationSet.NameServers

 

Using the output, create a file called subdomain.json:

$ cat subdomain.json
{
  "Comment": "Create a subdomain NS record in the parent domain",
  "Changes": [
    {
      "Action": "CREATE",
      "ResourceRecordSet": {
        "Name": "amiram.ek8s.com",
        "Type": "NS",
        "TTL": 300,
        "ResourceRecords": [
          {
            "Value": "ns-x.awsdns-16.com"
          },
          {
            "Value": "ns-y.awsdns-53.org"
          },
          {
            "Value": "ns-z.awsdns-35.co.uk"
          },
          {
            "Value": "ns-k.awsdns-39.net"
          }
        ]
      }
    }
  ]
}

Now, let’s route traffic to the correct subdomain *.amiram.ek8s.com  using the following command:

aws route53 change-resource-record-sets \
 --hosted-zone-id PARENT_ZONE_ID \
 --change-batch file://subdomain.json

 

You can grab PARENT_ZONE_ID  using the following command;

aws route53 list-hosted-zones | jq '.HostedZones[] | select(.Name=="ek8s.com.") | .Id'
 Note: This example assumes you have jq installed locally.

 

 

 

Create a State Store S3 Bucket

An S3 bucket is used to store the state of the cluster. This bucket should be created prior to the cluster creation.