148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}
Chapter 15 ■ Using an HA Master with OpenShiftFigure 15-10. The /etc/ansible/hosts fileSeveral other cluster variables are supported (see Table 2. Cluster Variables at https://docs.openshift.org/latest/install_config/install/advanced_install.html#multiple-masters), butwe have used only the minimum required. With multiple masters the HA (High Availability) methodnative is supported, which makes use of a LoadBalancer configured with [lb] host in the hosts file orpreconfigured.openshift_master_cluster_method=nativeWe shall be specifying a host for the load balancer in the /etc/ansible/hosts file. Obtain the hostnameor the Public DNS or the Public IP for the load balancer instance from the EC2 Console and specify the samein the following settings in the /etc/ansible/hosts file:openshift_master_cluster_hostname=ec2-54-226-7-241.compute-1.amazonaws.comopenshift_master_cluster_public_hostname=ec2-54-226-7-241.compute-1.amazonaws.comNext, specify the masters in the /etc/ansible/hosts file.Several host variables (see Table 1. Host Variables at the URL shown above) are supported, but we haveused only the host variables shown in Table 15-1 for the master, worker, etcd and lb.344
Chapter 15 ■ Using an HA Master with OpenShiftTable 15-1. Host VariablesHost Variable Description ExampleValueopenshift_ipopenshift_public_ipopenshift_hostnameopenshift_public_hostnamePrivate IP which may be obtainedfrom the EC2 ConsolePublic IP which may be obtainedfrom the EC2 ConsoleThe hostname for the host whichmay be obtained from the PrivateDNS in the EC2 ConsoleThe public hostname for the hostwhich may be obtained from thePublic DNS in the EC2 Console10.156.14.18354.90.107.98ip-10-156-14-183.ec2.internalec2-54-90-107-98.compute-1.amazonaws.comSimilarly configure the [etcd], [lb] and [nodes] sections. The masters are also listed in the [nodes]but made non-schedulable with openshift_schedulable set to false and have the labels added withopenshift_node_labels. The hosts settings should be similar to the following; the hostnames and IPaddress would be different for different users.[masters]ec2-54-90-107-98.compute-1.amazonaws.com openshift_ip=10.156.14.183 openshift_public_ip=54.90.107.98 openshift_hostname=ip-10-156-14-183.ec2.internal openshift_public_hostname=ec2-54-90-107-98.compute-1.amazonaws.comec2-54-221-182-68.compute-1.amazonaws.com openshift_ip=10.154.46.153 openshift_public_ip=54.221.182.68 openshift_hostname=ip-10-154-46-153.ec2.internal openshift_public_hostname=ec2-54-221-182-68.compute-1.amazonaws.com[etcd]ec2-54-160-210-253.compute-1.amazonaws.com openshift_ip=10.153.195.121 openshift_public_ip=54.160.210.253 openshift_hostname=ip-10-153-195-121.ec2.internal openshift_public_hostname=ec2-54-160-210-253.compute-1.amazonaws.com[lb]ec2-54-226-7-241.compute-1.amazonaws.com openshift_ip=10.154.38.224 openshift_public_ip=54.226.7.241 openshift_hostname=ip-10-154-38-224.ec2.internal openshift_public_hostname=ec2-54-226-7-241.compute-1.amazonaws.com[nodes]ec2-54-90-107-98.compute-1.amazonaws.com openshift_ip=10.156.14.183 openshift_public_ip=54.90.107.98 openshift_hostname=ip-10-156-14-183.ec2.internal openshift_public_hostname=ec2-54-90-107-98.compute-1.amazonaws.com openshift_node_labels="{'region':'primary', 'zone': 'east'}" openshift_schedulable=falseec2-54-221-182-68.compute-1.amazonaws.com openshift_ip=10.154.46.153 openshift_public_ip=54.221.182.68 openshift_hostname=ip-10-154-46-153.ec2.internal openshift_public_hostname=ec2-54-221-182-68.compute-1.amazonaws.com openshift_node_labels="{'region':'primary', 'zone': 'east'}" openshift_schedulable=falseec2-54-159-26-13.compute-1.amazonaws.com openshift_ip=10.113.176.99 openshift_public_ip=54.159.26.13 openshift_hostname=ip-10-113-176-99.ec2.internal openshift_public_hostname=ec2-54-159-26-13.compute-1.amazonaws.com openshift_node_labels="{'region':'primary', 'zone': 'east'}"345
- Page 305 and 306: Chapter 12 ■ Using Resource Quota
- Page 307 and 308: Chapter 12 ■ Using Resource Quota
- Page 309 and 310: Chapter 12 ■ Using Resource Quota
- Page 311 and 312: Chapter 12 ■ Using Resource Quota
- Page 313 and 314: CHAPTER 13Using AutoscalingStarting
- Page 315 and 316: Chapter 13 ■ Using AutoscalingThe
- Page 317 and 318: Chapter 13 ■ Using AutoscalingFig
- Page 319 and 320: Chapter 13 ■ Using Autoscaling./k
- Page 321 and 322: Chapter 13 ■ Using AutoscalingFig
- Page 323 and 324: CHAPTER 14Configuring LoggingLoggin
- Page 325 and 326: Chapter 14 ■ Configuring Logging
- Page 327 and 328: Docker Log FilesChapter 14 ■ Conf
- Page 329 and 330: Chapter 14 ■ Configuring LoggingF
- Page 331 and 332: Chapter 14 ■ Configuring LoggingC
- Page 333 and 334: Chapter 14 ■ Configuring Loggingv
- Page 335 and 336: Chapter 14 ■ Configuring LoggingI
- Page 337 and 338: Chapter 14 ■ Configuring LoggingT
- Page 339 and 340: Chapter 14 ■ Configuring Loggingt
- Page 341 and 342: Chapter 14 ■ Configuring LoggingT
- Page 343 and 344: Chapter 14 ■ Configuring LoggingF
- Page 345 and 346: Chapter 14 ■ Configuring LoggingF
- Page 347 and 348: CHAPTER 15Using an HA Master with O
- Page 349 and 350: Chapter 15 ■ Using an HA Master w
- Page 351 and 352: Installing the Network ManagerChapt
- Page 353 and 354: Chapter 15 ■ Using an HA Master w
- Page 355: Chapter 15 ■ Using an HA Master w
- Page 359 and 360: Chapter 15 ■ Using an HA Master w
- Page 361 and 362: Chapter 15 ■ Using an HA Master w
- Page 363 and 364: Chapter 15 ■ Using an HA Master w
- Page 365 and 366: Chapter 15 ■ Using an HA Master w
- Page 367 and 368: Chapter 16 ■ Developing a Highly
- Page 369 and 370: Chapter 16 ■ Developing a Highly
- Page 371 and 372: Chapter 16 ■ Developing a Highly
- Page 373 and 374: Chapter 16 ■ Developing a Highly
- Page 375 and 376: Chapter 16 ■ Developing a Highly
- Page 377 and 378: Chapter 16 ■ Developing a Highly
- Page 379 and 380: Chapter 16 ■ Developing a Highly
- Page 381 and 382: Chapter 16 ■ Developing a Highly
- Page 383 and 384: Chapter 16 ■ Developing a Highly
- Page 385 and 386: Chapter 16 ■ Developing a Highly
- Page 387 and 388: Chapter 16 ■ Developing a Highly
- Page 389 and 390: Chapter 16 ■ Developing a Highly
- Page 391 and 392: Chapter 16 ■ Developing a Highly
- Page 393 and 394: Chapter 16 ■ Developing a Highly
- Page 395 and 396: Chapter 16 ■ Developing a Highly
- Page 397 and 398: Chapter 16 ■ Developing a Highly
- Page 399 and 400: Chapter 16 ■ Developing a Highly
- Page 401 and 402: Chapter 16 ■ Developing a Highly
- Page 403 and 404: Chapter 16 ■ Developing a Highly
- Page 405 and 406: ■ INDEXClusters (cont.)configurat
Chapter 15 ■ Using an HA Master with OpenShift
Table 15-1. Host Variables
Host Variable Description ExampleValue
openshift_ip
openshift_public_ip
openshift_hostname
openshift_public_hostname
Private IP which may be obtained
from the EC2 Console
Public IP which may be obtained
from the EC2 Console
The hostname for the host which
may be obtained from the Private
DNS in the EC2 Console
The public hostname for the host
which may be obtained from the
Public DNS in the EC2 Console
10.156.14.183
54.90.107.98
ip-10-156-14-183.ec2.internal
ec2-54-90-107-98.compute-1.
amazonaws.com
Similarly configure the [etcd], [lb] and [nodes] sections. The masters are also listed in the [nodes]
but made non-schedulable with openshift_schedulable set to false and have the labels added with
openshift_node_labels. The hosts settings should be similar to the following; the hostnames and IP
address would be different for different users.
[masters]
ec2-54-90-107-98.compute-1.amazonaws.com openshift_ip=10.156.14.183 openshift_public_
ip=54.90.107.98 openshift_hostname=ip-10-156-14-183.ec2.internal openshift_public_
hostname=ec2-54-90-107-98.compute-1.amazonaws.com
ec2-54-221-182-68.compute-1.amazonaws.com openshift_ip=10.154.46.153 openshift_public_
ip=54.221.182.68 openshift_hostname=ip-10-154-46-153.ec2.internal openshift_public_
hostname=ec2-54-221-182-68.compute-1.amazonaws.com
[etcd]
ec2-54-160-210-253.compute-1.amazonaws.com openshift_ip=10.153.195.121 openshift_public_
ip=54.160.210.253 openshift_hostname=ip-10-153-195-121.ec2.internal openshift_public_
hostname=ec2-54-160-210-253.compute-1.amazonaws.com
[lb]
ec2-54-226-7-241.compute-1.amazonaws.com openshift_ip=10.154.38.224 openshift_public_
ip=54.226.7.241 openshift_hostname=ip-10-154-38-224.ec2.internal openshift_public_
hostname=ec2-54-226-7-241.compute-1.amazonaws.com
[nodes]
ec2-54-90-107-98.compute-1.amazonaws.com openshift_ip=10.156.14.183 openshift_public_
ip=54.90.107.98 openshift_hostname=ip-10-156-14-183.ec2.internal openshift_public_
hostname=ec2-54-90-107-98.compute-1.amazonaws.com openshift_node_labels="{'region':
'primary', 'zone': 'east'}" openshift_schedulable=false
ec2-54-221-182-68.compute-1.amazonaws.com openshift_ip=10.154.46.153 openshift_public_
ip=54.221.182.68 openshift_hostname=ip-10-154-46-153.ec2.internal openshift_public_
hostname=ec2-54-221-182-68.compute-1.amazonaws.com openshift_node_labels="{'region':
'primary', 'zone': 'east'}" openshift_schedulable=false
ec2-54-159-26-13.compute-1.amazonaws.com openshift_ip=10.113.176.99 openshift_public_
ip=54.159.26.13 openshift_hostname=ip-10-113-176-99.ec2.internal openshift_public_
hostname=ec2-54-159-26-13.compute-1.amazonaws.com openshift_node_labels="{'region':
'primary', 'zone': 'east'}"
345