148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}
CHAPTER 16Developing a Highly AvailableWebsiteIn Chapter 4 we used multiple AWS availability zones to provide fault tolerance for failure of a zone. But ahigh-availability master was not used, and the single master is a single point of failure. In Chapter 15 we diduse a high-availability master with OpenShift and Ansible, but the single elastic load balancer remains asingle point of failure.ProblemFor a high-availability website, multiple public DNSes need to be configured. Another problem is thatAmazon Elastic Load Balancers do not support Inter-AWS Region High-availability Architecture, in whichthe multiple master controllers in an HA master can be located in different AWS Regions. Amazon ElasticLoad Balancers only support Inter-AWS Zone High-availability Architecture within the same region. WhileAWS zones are in different physical locations and are insulated from each other (failure of a one zone doesnot cause failure in another zone), the HA is not spread across a wider geographical region.SolutionAmazon Route 53 provides DNS failover, using which a high-availability website may be developed. Route53 provides DNS failover across AWS regions as shown in Figure 16-1. Route 53 DNS failover can be usedto run applications across AWS zones or regions and configure alternate elastic load balancers to providefailover across zones or regions. Route 53 DNS failover is not a Kubernetes design pattern but makes use ofthe Amazon Route 53 Primary-Secondary architectural pattern.© Deepak Vohra 2017D. Vohra, Kubernetes Management Design Patterns, DOI 10.1007/978-1-4842-2598-1_16355
Chapter 16 ■ Developing a Highly Available WebsiteAmazonRoute53PublicHostedZoneAWSZoneus-east-1cAWSZoneus-west-2bPrimaryDNSSecondaryDNSFigure 16-1. Amazon Route 53 DNS failoverOverviewAmazon Route 53 is a highly available and scalable cloud domain name service (DNS) connecting userrequests to infrastructure running on the AWS, such as Amazon EC2 instances, load balancers, andAmazon S3 buckets. A Kubernetes cluster can be deployed using AWS CloudFormation, as discussed inChapter 4. But the cluster developed there, using the kube-aws CLI tool, was a single master cluster withoutthe provision of a failover. A highly available cluster has the tolerance for failure of a node in the clusterwith built-in failover to another node in the cluster. In this chapter we shall develop a highly availableKubernetes cluster using AWS CloudFormation on CoreOS. We shall provision multiple (three) AWSCloudFormations and subsequently host an example application (hello-world) Kubernetes Service oneach of the CloudFormations. We’ll use a public hosted zone for an example domain to route traffic to thatdomain. This chapter covers the following topics.Setting the environmentCreating CloudFormationsConfiguring external DNSCreating a Kubernetes serviceCreating an AWS Route 53Creating a hosted zoneConfiguring name serversCreating record setsTesting high availability356
- 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 and 356: Chapter 15 ■ Using an HA Master w
- Page 357 and 358: 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: Chapter 15 ■ Using an HA Master w
- 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
- Page 407 and 408: ■ INDEXKubernetes (cont.)nodes, 6
- Page 409 and 410: ■ INDEXRoute 53 service (cont.)de
CHAPTER 16
Developing a Highly Available
Website
In Chapter 4 we used multiple AWS availability zones to provide fault tolerance for failure of a zone. But a
high-availability master was not used, and the single master is a single point of failure. In Chapter 15 we did
use a high-availability master with OpenShift and Ansible, but the single elastic load balancer remains a
single point of failure.
Problem
For a high-availability website, multiple public DNSes need to be configured. Another problem is that
Amazon Elastic Load Balancers do not support Inter-AWS Region High-availability Architecture, in which
the multiple master controllers in an HA master can be located in different AWS Regions. Amazon Elastic
Load Balancers only support Inter-AWS Zone High-availability Architecture within the same region. While
AWS zones are in different physical locations and are insulated from each other (failure of a one zone does
not cause failure in another zone), the HA is not spread across a wider geographical region.
Solution
Amazon Route 53 provides DNS failover, using which a high-availability website may be developed. Route
53 provides DNS failover across AWS regions as shown in Figure 16-1. Route 53 DNS failover can be used
to run applications across AWS zones or regions and configure alternate elastic load balancers to provide
failover across zones or regions. Route 53 DNS failover is not a Kubernetes design pattern but makes use of
the Amazon Route 53 Primary-Secondary architectural pattern.
© Deepak Vohra 2017
D. Vohra, Kubernetes Management Design Patterns, DOI 10.1007/978-1-4842-2598-1_16
355