148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}
Chapter 16 ■ Developing a Highly Available WebsiteFigure 16-8. EC2 instances for three CloudFormations for Kubernetes clustersConfiguring External DNSNext, add an A record for each of the controller instances to the oramagsearch.com (the domain name wouldbe different for different users) domain zone file as shown in Figure 16-9.Figure 16-9. Adding A records for controller instances361
Chapter 16 ■ Developing a Highly Available WebsiteCreating a Kubernetes ServiceIn this section we shall create a hello-world application and expose the application as a service of typeLoadBalancer on each of the three Kubernetes clusters. As a result, three elastic load balancers eachexposing the hello-world service should be available.SSH log in to each of the controller instances and after verifying that the cluster nodes are being listedcreate an application with the tutum/hello-world Docker image.kubectl -s http://localhost:8080 run hello-world --image=tutum/hello-world --replicas=2--port=8List the cluster-wide pods:kubectl get pods –o wideList the deployments:kubectl get deploymentsSubsequently, expose the deployment as a service of type LoadBalancer:kubectl expose deployment hello-world--port=80 --type=LoadBalancerList the services:kubectl get servicesThe output from the preceding commands is shown in Figure 16-10.Figure 16-10. Creating a hello-world deployment and service362
- 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 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: 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
Figure 16-8. EC2 instances for three CloudFormations for Kubernetes clusters
Configuring External DNS
Next, add an A record for each of the controller instances to the oramagsearch.com (the domain name would
be different for different users) domain zone file as shown in Figure 16-9.
Figure 16-9. Adding A records for controller instances
361