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 4 ■ Using Multiple Zones

Figure 4-22. Listing the nodes including the labels

As shown in the EC2 console in Figure 4-23, all the nodes are running in the same zone, us-east-1c.

Why the same zone even though MULTIZONE is set to true? Because the setting makes the cluster multi-zone

aware and not multi-zone to start with. We shall discuss subsequently adding node sets in other zones using

the same master controller.

Figure 4-23. All nodes in the same zone, us-east-1c

Next, start another node set in a different zone but using the same master as the first node set. Obtain

the Private IP of the master instance from the EC2 console. Run the following command in which the

MASTER_INTERNAL_IP specifies the private IP of the master controller and KUBE_SUBNET_CIDR specifies the

subnet CIDR. KUBE_USE_EXISTING_MASTER is set to true, implying that the existing master is to be used. The

KUBE_AWS_ZONE is set to a different zone, us-east-1b.

KUBE_USE_EXISTING_MASTER=true MULTIZONE=true KUBERNETES_PROVIDER=aws KUBE_AWS_ZONE=us-east-

1b NUM_NODES=3 KUBE_SUBNET_CIDR=172.20.1.0/24 MASTER_INTERNAL_IP=172.20.0.9 kubernetes/

cluster/kube-up.sh

Another node set in a different zone, us-east-1b, is started as shown by the command output in

Figure 4-24.

105

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

Saved successfully!

Ooh no, something went wrong!