148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}
Chapter 3 ■ Kubernetes on Google Cloud PlatformNext, build a Docker image using the docker build command.docker build -t gcr.io/kube-gke/hello-node:v1.The Docker image node:4.4, from which the image gcr.io/kube-gke/hello-node:v1 is built, is pulledas shown in Figure 3-63.Figure 3-63. Running the docker build commandThe Docker image is built as shown in Figure 3-64.Figure 3-64. The Docker image built83
Chapter 3 ■ Kubernetes on Google Cloud PlatformRun the Docker image with the docker run command:docker run -d -p 8080:8080 gcr.io/kube-gke/hello-node:v1Invoke the application with the curl command:curl http://localhost:8080The Hello World! message is output as shown in Figure 3-65.Figure 3-65. Running and Invoking the hello-node ApplicationThe Docker image may be pushed to the Google Container Registry, with the following command:gcloud docker push gcr.io/kube-gke/hello-node:v1The command output is shown in Figure 3-66.Figure 3-66. Uploading the Docker Image to Google Container RegistryThe Docker image is pushed to the repository as shown in Figure 3-67.84
- Page 49 and 50: Customizing the ClusterChapter 2
- Page 51 and 52: Chapter 2 ■ Kubernetes on CoreOS
- Page 53 and 54: Chapter 2 ■ Kubernetes on CoreOS
- Page 55 and 56: Chapter 2 ■ Kubernetes on CoreOS
- Page 57 and 58: Chapter 2 ■ Kubernetes on CoreOS
- Page 59 and 60: Chapter 2 ■ Kubernetes on CoreOS
- Page 61 and 62: Chapter 2 ■ Kubernetes on CoreOS
- Page 63 and 64: Chapter 2 ■ Kubernetes on CoreOS
- Page 65 and 66: Chapter 2 ■ Kubernetes on CoreOS
- Page 67 and 68: Chapter 3 ■ Kubernetes on Google
- Page 69 and 70: Chapter 3 ■ Kubernetes on Google
- Page 71 and 72: Chapter 3 ■ Kubernetes on Google
- Page 73 and 74: Chapter 3 ■ Kubernetes on Google
- Page 75 and 76: Chapter 3 ■ Kubernetes on Google
- Page 77 and 78: Chapter 3 ■ Kubernetes on Google
- Page 79 and 80: Chapter 3 ■ Kubernetes on Google
- Page 81 and 82: Chapter 3 ■ Kubernetes on Google
- Page 83 and 84: Chapter 3 ■ Kubernetes on Google
- Page 85 and 86: Chapter 3 ■ Kubernetes on Google
- Page 87 and 88: Chapter 3 ■ Kubernetes on Google
- Page 89 and 90: Chapter 3 ■ Kubernetes on Google
- Page 91 and 92: Chapter 3 ■ Kubernetes on Google
- Page 93 and 94: Chapter 3 ■ Kubernetes on Google
- Page 95 and 96: Chapter 3 ■ Kubernetes on Google
- Page 97 and 98: Chapter 3 ■ Kubernetes on Google
- Page 99: Chapter 3 ■ Kubernetes on Google
- Page 103 and 104: Chapter 3 ■ Kubernetes on Google
- Page 105 and 106: PART IIAdministration andConfigurat
- Page 107 and 108: Chapter 4 ■ Using Multiple ZonesS
- Page 109 and 110: Chapter 4 ■ Using Multiple ZonesF
- Page 111 and 112: Chapter 4 ■ Using Multiple ZonesF
- Page 113 and 114: Chapter 4 ■ Using Multiple ZonesA
- Page 115 and 116: Chapter 4 ■ Using Multiple ZonesF
- Page 117 and 118: Chapter 4 ■ Using Multiple ZonesR
- Page 119 and 120: Chapter 4 ■ Using Multiple ZonesF
- Page 121 and 122: Chapter 4 ■ Using Multiple ZonesF
- Page 123 and 124: Chapter 4 ■ Using Multiple ZonesL
- Page 125 and 126: Chapter 4 ■ Using Multiple ZonesF
- Page 127 and 128: Chapter 4 ■ Using Multiple ZonesI
- Page 129 and 130: Chapter 4 ■ Using Multiple ZonesC
- Page 131 and 132: Chapter 4 ■ Using Multiple ZonesA
- Page 133 and 134: Chapter 5 ■ Using the Tectonic Co
- Page 135 and 136: Chapter 5 ■ Using the Tectonic Co
- Page 137 and 138: Chapter 5 ■ Using the Tectonic Co
- Page 139 and 140: Chapter 5 ■ Using the Tectonic Co
- Page 141 and 142: Chapter 5 ■ Using the Tectonic Co
- Page 143 and 144: Chapter 5 ■ Using the Tectonic Co
- Page 145 and 146: Chapter 5 ■ Using the Tectonic Co
- Page 147 and 148: Chapter 5 ■ Using the Tectonic Co
- Page 149 and 150: Chapter 5 ■ Using the Tectonic Co
Chapter 3 ■ Kubernetes on Google Cloud Platform
Next, build a Docker image using the docker build command.
docker build -t gcr.io/kube-gke/hello-node:v1.
The Docker image node:4.4, from which the image gcr.io/kube-gke/hello-node:v1 is built, is pulled
as shown in Figure 3-63.
Figure 3-63. Running the docker build command
The Docker image is built as shown in Figure 3-64.
Figure 3-64. The Docker image built
83