19.06.2021 Views

148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 4 ■ Using Multiple Zones

Run the nginx Docker image to create six pod replicas:

kubectl run nginx --image=nginx --replicas=6 --port=80

Subsequently, list the pods:

kubectl get pods –o wide

The nginx deployment is created and the pods are listed. Initially the pods may be listed as not ready, as

indicated by the READY column value of 0/1 and STATUS column value of ContainerCreating in Figure 4-17.

Figure 4-17. Running the Kubernetes nginx application

Run the kubectl get pods –o wide command again after a few more seconds (up to a minute) and

all the pods should be running and ready as shown in Figure 4-18. As indicated in the NODE column, each

of the six pods is running on a different node, which implies that the pods are spread across the zones in the

cluster. A failure of a single zone will not affect the availability of the deployment.

Figure 4-18. All pods running and ready

102

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!