148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}
Chapter 15 ■ Using an HA Master with OpenShiftFind the project status:oc statusCreate a new OpenShift application with the oc new-app command.oc new-app openshift/ruby-20-centos7~https://github.com/openshift/ruby-hello-world.gitA new OpenShift application is created.To delete all the objects for an application run the following command:oc delete all -l app=appNameFor example, to delete all the objects for the hello-world application, run the following command:oc delete all -l app=hello-worldCreate some other application with the oc new-app command. The image tag may be specified, forexample for the openshift/deployment-example Docker image.oc new-app openshift/deployment-example:v1An OpenShift application is created. Initially the oc get pods command may list the pods as notrunning, but with Status ContainerCreating as shown in Figure 15-15.Figure 15-15. Listing the podsMultiple applications from the same Docker image may be started concurrently; for example, run thesame command again:oc new-app openshift/deployment-example:v1When both the applications have started, two pods are listed, as shown in Figure 15-16.Figure 15-16. Running multiple applications concurrently348
Chapter 15 ■ Using an HA Master with OpenShiftThe node on which a pod is running may be listed with the following command:oc get –o wide podsThe node for the pod also is listed as shown in Figure 15-17.Figure 15-17. Listing pods including the nodesThe oc describe command is used to describe a deployment:oc describe dc/deployment-exampleThe services are listed with the following command:oc get servicesList all OpenShift objects with the following command:oc get allTesting the High AvailabilityWith multiple masters and High availability configured with the native method, the load balancer distributesthe master load across the masters. The master API server is exposed on the IP Address of the load balancer,but actually one API server is running on each of the masters. The two master instances and the singleworker instance are shown in Figure 15-18.349
- 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 and 356: Chapter 15 ■ Using an HA Master w
- Page 357 and 358: Chapter 15 ■ Using an HA Master w
- Page 359: 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
- Page 407 and 408: ■ INDEXKubernetes (cont.)nodes, 6
- Page 409 and 410: ■ INDEXRoute 53 service (cont.)de
Chapter 15 ■ Using an HA Master with OpenShift
Find the project status:
oc status
Create a new OpenShift application with the oc new-app command.
oc new-app openshift/ruby-20-centos7~https://github.com/openshift/ruby-hello-world.git
A new OpenShift application is created.
To delete all the objects for an application run the following command:
oc delete all -l app=appName
For example, to delete all the objects for the hello-world application, run the following command:
oc delete all -l app=hello-world
Create some other application with the oc new-app command. The image tag may be specified, for
example for the openshift/deployment-example Docker image.
oc new-app openshift/deployment-example:v1
An OpenShift application is created. Initially the oc get pods command may list the pods as not
running, but with Status ContainerCreating as shown in Figure 15-15.
Figure 15-15. Listing the pods
Multiple applications from the same Docker image may be started concurrently; for example, run the
same command again:
oc new-app openshift/deployment-example:v1
When both the applications have started, two pods are listed, as shown in Figure 15-16.
Figure 15-16. Running multiple applications concurrently
348