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 3 ■ Kubernetes on Google Cloud Platform

Run the Docker image with the docker run command:

docker run -d -p 8080:8080 gcr.io/kube-gke/hello-node:v1

Invoke the application with the curl command:

curl http://localhost:8080

The Hello World! message is output as shown in Figure 3-65.

Figure 3-65. Running and Invoking the hello-node Application

The Docker image may be pushed to the Google Container Registry, with the following command:

gcloud docker push gcr.io/kube-gke/hello-node:v1

The command output is shown in Figure 3-66.

Figure 3-66. Uploading the Docker Image to Google Container Registry

The Docker image is pushed to the repository as shown in Figure 3-67.

84

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

Saved successfully!

Ooh no, something went wrong!