148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}
OverviewChapter 4 ■ Using Multiple ZonesIn this chapter we shall create a multiple-zone AWS CloudFormation on CoreOS. We shall also demonstratevolume-zone affinity for a persistent volume on a multiple-zone cluster with AWS cloud provider. The stepswe’ll take are as follows:Setting the environmentInitializing a CloudFormationConfiguring cluster.yaml for multiple zonesLaunching the CloudFormationConfiguring External DNSRunning a Kubernetes ApplicationUsing Multiple Zones on AWSSetting the EnvironmentYou’ll find the details of creating a Kubernetes cluster on a CoreOS AWS CloudFormation in Chapter 2. Weonly need to start a single EC2 instance to launch the CloudFormation from. Create an EC2 instance usingthe Amazon Linux AMI, which has the AWS CLI installed by default; the AWS CLI is used to initialize andlaunch a CloudFormation. Obtain the Public IP address of the EC2 instance from the EC2 console. SSH log ininto the EC2 instance:ssh -i "docker.pem" ec2-user@184.73.19.214The Amazon Linux AMI command prompt is displayed.Because we will be launching an AWS CloudFormation for a Kubernetes cluster, the CloudFormationstack name must be one that is not already used. If a CloudFormation stack name is already used an errorsimilar to the following (Figure 4-3) is generated.Figure 4-3. Stack already exists errorTo find whether a CloudFormation stack name can be used, click Services ➤ CloudFormation as shownin Figure 4-4.93
Chapter 4 ■ Using Multiple ZonesFigure 4-4. Choosing Services ➤ CloudFormationThe stacks are listed as shown in Figure 4-5. A stack name the same as one that is listed cannot be usedto create a new stack.Figure 4-5. Listing the CloudFormation stacks94
- Page 57 and 58: Chapter 2 ■ Kubernetes on CoreOS
- Page 59 and 60: Chapter 2 ■ Kubernetes on CoreOS
- Page 61 and 62: Chapter 2 ■ Kubernetes on CoreOS
- Page 63 and 64: Chapter 2 ■ Kubernetes on CoreOS
- Page 65 and 66: Chapter 2 ■ Kubernetes on CoreOS
- Page 67 and 68: Chapter 3 ■ Kubernetes on Google
- Page 69 and 70: Chapter 3 ■ Kubernetes on Google
- Page 71 and 72: Chapter 3 ■ Kubernetes on Google
- Page 73 and 74: Chapter 3 ■ Kubernetes on Google
- Page 75 and 76: Chapter 3 ■ Kubernetes on Google
- Page 77 and 78: Chapter 3 ■ Kubernetes on Google
- Page 79 and 80: Chapter 3 ■ Kubernetes on Google
- Page 81 and 82: Chapter 3 ■ Kubernetes on Google
- Page 83 and 84: Chapter 3 ■ Kubernetes on Google
- Page 85 and 86: Chapter 3 ■ Kubernetes on Google
- Page 87 and 88: Chapter 3 ■ Kubernetes on Google
- Page 89 and 90: Chapter 3 ■ Kubernetes on Google
- Page 91 and 92: Chapter 3 ■ Kubernetes on Google
- Page 93 and 94: Chapter 3 ■ Kubernetes on Google
- Page 95 and 96: Chapter 3 ■ Kubernetes on Google
- Page 97 and 98: Chapter 3 ■ Kubernetes on Google
- Page 99 and 100: Chapter 3 ■ Kubernetes on Google
- Page 101 and 102: Chapter 3 ■ Kubernetes on Google
- Page 103 and 104: Chapter 3 ■ Kubernetes on Google
- Page 105 and 106: PART IIAdministration andConfigurat
- Page 107: Chapter 4 ■ Using Multiple ZonesS
- Page 111 and 112: Chapter 4 ■ Using Multiple ZonesF
- Page 113 and 114: Chapter 4 ■ Using Multiple ZonesA
- Page 115 and 116: Chapter 4 ■ Using Multiple ZonesF
- Page 117 and 118: Chapter 4 ■ Using Multiple ZonesR
- Page 119 and 120: Chapter 4 ■ Using Multiple ZonesF
- Page 121 and 122: Chapter 4 ■ Using Multiple ZonesF
- Page 123 and 124: Chapter 4 ■ Using Multiple ZonesL
- Page 125 and 126: Chapter 4 ■ Using Multiple ZonesF
- Page 127 and 128: Chapter 4 ■ Using Multiple ZonesI
- Page 129 and 130: Chapter 4 ■ Using Multiple ZonesC
- Page 131 and 132: Chapter 4 ■ Using Multiple ZonesA
- Page 133 and 134: Chapter 5 ■ Using the Tectonic Co
- Page 135 and 136: Chapter 5 ■ Using the Tectonic Co
- Page 137 and 138: Chapter 5 ■ Using the Tectonic Co
- Page 139 and 140: Chapter 5 ■ Using the Tectonic Co
- Page 141 and 142: Chapter 5 ■ Using the Tectonic Co
- Page 143 and 144: Chapter 5 ■ Using the Tectonic Co
- Page 145 and 146: Chapter 5 ■ Using the Tectonic Co
- Page 147 and 148: Chapter 5 ■ Using the Tectonic Co
- Page 149 and 150: Chapter 5 ■ Using the Tectonic Co
- Page 151 and 152: Chapter 6 ■ Using VolumesPodDocke
- Page 153 and 154: Chapter 6 ■ Using VolumesObtain t
- Page 155 and 156: Chapter 6 ■ Using VolumesFigure 6
- Page 157 and 158: Chapter 6 ■ Using VolumesThe prec
Chapter 4 ■ Using Multiple Zones
Figure 4-4. Choosing Services ➤ CloudFormation
The stacks are listed as shown in Figure 4-5. A stack name the same as one that is listed cannot be used
to create a new stack.
Figure 4-5. Listing the CloudFormation stacks
94