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-3. Validate the tarball’s GPG signature

Extract the binary from the tar.gz file:

tar zxvf kube-aws-linux-amd64.tar.gz

Add kube-aws to the path:

sudo mv linux-amd64/kube-aws /usr/local/bin

The kube-aws CloudFormation generator is installed. You can display information about its usage with

the kube-aws –help command.

Setting Up Cluster Parameters

Before initializing and launching the AWS CloudFormation cluster we need to create or define the following

cluster parameters:

• EC2 key pair

• KMS key

• External DNS name

Before creating a key pair we need to configure an AWS region; we already did that with the aws

configure command. Run the following command to create a key pair called kubernetes-coreos and save it

as kubernetes-coreos.pem:

aws ec2 create-key-pair --key-name kubernetes-coreos --query 'KeyMaterial' --output text >

kubernetes-coreos.pem

Modify the access permissions of the key pair using the mode 400, which sets access permissions to

read by owner.

chmod 400 kubernetes-coreos.pem

27

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

Saved successfully!

Ooh no, something went wrong!