19.06.2021 Views

148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 2 ■ Kubernetes on CoreOS on AWS

Figure 2-6. Creating a KMS key

Setting Up an External DNS Name

Next you need to register a domain name with a domain registrar, as we shall be using the domain’s external

DNS name to make the cluster API accessible. We have used the external DNS name NOSQLSEARCH.COM. The

NOSQLSEARCH.COM domain is not usable for all users, and different users would need to register a different

domain name with a domain registry. Or, use a domain that is already registered.

Creating the Cluster

Creating a cluster requires the following procedure:

1. Create an asset directory.

2. Initialize the CloudFormation stack.

3. Render the contents of the asset directory.

4. Customize the cluster optionally in the cluster.yaml file.

5. Validate the CloudFormation stack and the cloud-config user data files.

6. Launch the CloudFormation stack.

We shall discuss each of these stages next.

Creating an Asset Directory

Create a directory on the Amazon Linux EC2 instance for the generated assets. Then cd (change directory) to

the asset directory:

mkdir coreos-cluster

cd coreos-cluster

29

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!