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.

Using Multiple Zones on AWS

Chapter 4 ■ Using Multiple Zones

If a Kubernetes cluster is to be started with multi-zone capability, the MULTIZONE parameter must be set to

true. Setting MULTIZONE to true does not automatically start nodes running in multiple zones; it only adds

the capability to manage a multi-zone cluster. If cluster nodes are to be run in multiple zones, multiple sets of

nodes must be started in separate zones using the same master controller as the first zone node set. When a

node set is started in a zone-aware cluster, the nodes are labeled indicating the zone in which the nodes run.

First, start a multi-zone aware cluster using the AWS Kubernetes provider by setting MULTIZONE=true.

Setting KUBE_AWS_ZONE to true creates the master controller node and all the minion nodes in the specified

zone. The NUM_NODES value sets the number of nodes to create. Run the following command to start a cluster

in zone us-east-1c with three nodes:

curl -sS https://get.k8s.io | MULTIZONE=true KUBERNETES_PROVIDER=aws KUBE_AWS_ZONE=us-east-

1c NUM_NODES=3 bash

Kubernetes binaries are downloaded with the MULTIZONE command, as shown in Figure 4-19.

Figure 4-19. Starting a multi-zone aware cluster

A multi-zone Kubernetes cluster is started as shown in Figure 4-20. What is different about the cluster is

that it is aware of multiple-zones.

103

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

Saved successfully!

Ooh no, something went wrong!