19.06.2021 Views

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 2 ■ Kubernetes on CoreOS on AWS

Initializing the Cluster CloudFormation

Using the Amazon EC2 key pair, KMS Key ARN string, and external DNS name, initialize the CloudFormation

stack:

kube-aws init --cluster-name=kube-coreos-cluster

--external-dns-name=NOSQLSEARCH.COM

--region=us-east-1

--availability-zone=us-east-1c

--key-name=kubernetes-coreos

--kms-key-arn="arn:aws:kms:us-east-1:672593526685:key/b7209ba2-cb87-4ccf-8401-5c6fd4fb9f9b "

The CloudFormation stack assets are created; the main configuration file is cluster.yaml, as shown in

Figure 2-7.

Figure 2-7. Creating CloudFormation stack assets

Rendering Contents of the Asset Directory

Next, render (generate) the cluster assets (templates and credentials), which are used to create, update, and

interact with the Kubernetes cluster.

kube-aws render

The CloudFormation template stack-template.json is created (as shown in Figure 2-8); it will be used

to create the Kubernetes cluster. The cluster.yaml, userdata files for the Kubernetes controller and the

worker, and stack-template.json could optionally be customized.

Figure 2-8. Rendering clustering assets

30

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

Saved successfully!

Ooh no, something went wrong!