About the Author |
|
xiii | |
About the Technical Reviewer |
|
xv | |
Acknowledgments |
|
xvii | |
Introduction |
|
xix | |
Chapter 1 Get Started with Google Cloud Platform (GCP) |
|
1 | (38) |
|
|
1 | (1) |
|
Get Started with Google Cloud Platform (GCP) |
|
|
2 | (5) |
|
The Benefits of a GCP Free Tier Account |
|
|
3 | (1) |
|
|
3 | (4) |
|
Understanding GCP Projects |
|
|
7 | (14) |
|
|
7 | (5) |
|
|
12 | (6) |
|
|
18 | (2) |
|
|
20 | (1) |
|
Understanding Cloud Shell |
|
|
21 | (10) |
|
|
21 | (1) |
|
Deploy a VM Instance Using Cloud Shell |
|
|
22 | (2) |
|
Work with Projects in Cloud Shell |
|
|
24 | (1) |
|
|
25 | (5) |
|
|
30 | (1) |
|
Secure and Manage Your GCP Account |
|
|
31 | (3) |
|
Multi-Factor Authentication |
|
|
31 | (1) |
|
Create an Account with Specific Roles |
|
|
31 | (2) |
|
|
33 | (1) |
|
|
34 | (1) |
|
Avoid Using Primitive Roles |
|
|
34 | (1) |
|
GCP Container Services Overview |
|
|
34 | (3) |
|
Google Kubernetes Service (GKE) |
|
|
35 | (1) |
|
Google Container Registry |
|
|
35 | (1) |
|
|
35 | (1) |
|
|
36 | (1) |
|
Google Cloud Platform Container Services |
|
|
36 | (1) |
|
|
37 | (2) |
Chapter 2 Google Container Registry (GCR) |
|
39 | (30) |
|
|
39 | (6) |
|
|
40 | (3) |
|
Install Docker Desktop on Windows 10 |
|
|
43 | (1) |
|
|
44 | (1) |
|
Check That Docker Is Working |
|
|
44 | (1) |
|
Introduction to Container Registries |
|
|
45 | (2) |
|
|
45 | (1) |
|
|
45 | (1) |
|
Create a Local Docker Registry |
|
|
45 | (2) |
|
Introduction to Google Container Registry (GCR) |
|
|
47 | (1) |
|
Enable GCP Container Registry |
|
|
47 | (3) |
|
Push Docker Images to Google Container Registry (GCR) |
|
|
50 | (6) |
|
|
50 | (3) |
|
|
53 | (3) |
|
Pull Images from GCR Container Registry |
|
|
56 | (2) |
|
|
57 | (1) |
|
|
57 | (1) |
|
|
57 | (1) |
|
Manage and Secure Images on GCR |
|
|
58 | (4) |
|
About GCR Vulnerability Scanner |
|
|
59 | (1) |
|
|
59 | (2) |
|
Fix Vulnerabilities on a Docker Image |
|
|
61 | (1) |
|
Step 1: Pull the Image from GCR |
|
|
61 | (1) |
|
|
61 | (1) |
|
|
61 | (1) |
|
Step 4: Push the Image to GCR |
|
|
62 | (1) |
|
Container Registry Best Practices |
|
|
62 | (1) |
|
|
62 | (1) |
|
Keep Your Registry Close to Your Applications |
|
|
62 | (1) |
|
|
63 | (1) |
|
|
63 | (4) |
|
|
63 | (2) |
|
Assign Permissions to GCR |
|
|
65 | (2) |
|
|
67 | (2) |
Chapter 3 Deploy Containers with Cloud Run |
|
69 | (36) |
|
|
69 | (1) |
|
Get Started with Cloud Run |
|
|
70 | (1) |
|
Cloud Run gcloud Commands |
|
|
70 | (1) |
|
Deploy Containers to Cloud Run |
|
|
71 | (8) |
|
Step 1: Package Application |
|
|
71 | (1) |
|
|
72 | (1) |
|
Step 3: Push the Image to GCR |
|
|
73 | (1) |
|
Step 4: Deploy the Application from GCR into Cloud Run |
|
|
74 | (5) |
|
Deploy Containers to Cloud Run Using gcloud |
|
|
79 | (2) |
|
|
80 | (1) |
|
|
80 | (1) |
|
|
80 | (1) |
|
Use Cloud Build and Git to Deploy Containers to Cloud Run |
|
|
81 | (7) |
|
|
81 | (1) |
|
Set Up Cloud Source Repositories |
|
|
81 | (7) |
|
|
88 | (15) |
|
Enable Cloud Build and Grant Deploy Permissions |
|
|
89 | (1) |
|
Grant Cloud Build Permission to Deploy |
|
|
89 | (2) |
|
Cloudbuild.yaml File Configuration |
|
|
91 | (3) |
|
Cloud Build Trigger Event |
|
|
94 | (9) |
|
|
103 | (2) |
Chapter 4 Deploy Containerized Applications with Google Kubernetes Engine (GKE) |
|
105 | (32) |
|
|
105 | (3) |
|
|
106 | (2) |
|
|
108 | (2) |
|
Single- or Multi-Zone Deployment |
|
|
109 | (1) |
|
|
109 | (1) |
|
Vertical Pod Auto-scaling (VPA) |
|
|
109 | (1) |
|
|
109 | (1) |
|
|
110 | (1) |
|
Deploy Our First GKE Cluster |
|
|
110 | (11) |
|
Express or Standard Setup Option |
|
|
110 | (1) |
|
|
111 | (2) |
|
|
113 | (2) |
|
|
115 | (1) |
|
|
116 | (2) |
|
|
118 | (1) |
|
|
119 | (2) |
|
Deploy a GKE Cluster Using Cloud SDK and gcloud |
|
|
121 | (3) |
|
Create a Bash Script for GKE Deployment |
|
|
123 | (1) |
|
|
124 | (7) |
|
Deploy a Stateless Application to GKE Using kubectl |
|
|
124 | (3) |
|
Deploy a Stateful Application to GKE |
|
|
127 | (1) |
|
|
127 | (2) |
|
Deploy a Stateful Application |
|
|
129 | (1) |
|
|
129 | (1) |
|
|
130 | (1) |
|
|
130 | (1) |
|
Redeploy and Check the Volume |
|
|
130 | (1) |
|
|
131 | (1) |
|
|
131 | (1) |
|
|
132 | (1) |
|
Deploy Workloads to GKE Using Cloud Run for Anthos |
|
|
132 | (3) |
|
|
133 | (1) |
|
Deploy Containers to Anthos Using Cloud Shell |
|
|
134 | (1) |
|
Deploy Containers to Anthos Using Cloud Run Console |
|
|
135 | (1) |
|
|
135 | (2) |
Chapter 5 Deploy Docker Containers on GCP Compute Engine |
|
137 | (28) |
|
|
138 | (1) |
|
Container-Optimized OS from Google |
|
|
138 | (1) |
|
Deploy Linux Docker Container Host |
|
|
139 | (8) |
|
Use Cloud Shell to Create a VM |
|
|
139 | (1) |
|
|
140 | (1) |
|
Connect to GCR and Pull Docker Image |
|
|
141 | (2) |
|
Create Linux Docker Host Using the Console |
|
|
143 | (4) |
|
Deploy Windows Server 2019 Docker Host |
|
|
147 | (7) |
|
Deploy Windows Containers |
|
|
153 | (1) |
|
Deploy and Manage Containers on Azure VM (Linux and Windows) |
|
|
154 | (9) |
|
|
155 | (1) |
|
|
155 | (1) |
|
|
155 | (1) |
|
Map Container Host Volume |
|
|
156 | (1) |
|
Start a Docker Container in Bash |
|
|
156 | (1) |
|
|
156 | (1) |
|
|
157 | (1) |
|
|
157 | (1) |
|
Deploy a Docker Compose Application |
|
|
158 | (1) |
|
|
159 | (1) |
|
One-Line to Delete All Running and Non-running Containers |
|
|
160 | (1) |
|
|
160 | (1) |
|
Delete Unused Docker Images |
|
|
160 | (1) |
|
Delete All Docker Volumes |
|
|
160 | (1) |
|
View Changes in Docker Image |
|
|
161 | (1) |
|
Check Docker Image Build History |
|
|
161 | (1) |
|
Run Multiple Websites on Docker Using HTTP and HTTPS |
|
|
161 | (2) |
|
|
163 | (2) |
Chapter 6 Chapter Secure Your GCP Environment and Containers |
|
165 | (24) |
|
Introduction to GCP Identify Infrastructure |
|
|
165 | (1) |
|
|
166 | (7) |
|
|
166 | (1) |
|
|
166 | (1) |
|
|
166 | (1) |
|
|
167 | (3) |
|
|
170 | (3) |
|
Organization Administrators |
|
|
173 | (1) |
|
|
174 | (7) |
|
|
174 | (7) |
|
|
181 | (3) |
|
|
182 | (2) |
|
|
184 | (1) |
|
Firewall Rules for App Engine |
|
|
184 | (1) |
|
|
184 | (1) |
|
|
184 | (2) |
|
|
185 | (1) |
|
Create a Shielded VM Using Cloud Shell |
|
|
186 | (1) |
|
|
186 | (1) |
|
Use Separate Organizations Admin Account |
|
|
187 | (1) |
|
Multi-Factor Authentication |
|
|
187 | (1) |
|
|
187 | (1) |
|
|
187 | (2) |
Chapter 7 Chapter Scaling |
|
189 | (32) |
|
Scale Google Kubernetes Service (GKE) |
|
|
189 | (9) |
|
|
189 | (1) |
|
|
190 | (1) |
|
Enable GKE Cluster Autoscaler Using GKE Console |
|
|
190 | (1) |
|
Enable Autoscaler Using Cloud SDK and gcloud |
|
|
191 | (1) |
|
Enable Autoscaler on Existing GKE Cluster |
|
|
192 | (1) |
|
Horizontal vs. Vertical Pod Autoscaler |
|
|
192 | (1) |
|
Vertical Pod Auto-scaling |
|
|
193 | (1) |
|
Enable VPA on GKE Cluster Using Console |
|
|
193 | (1) |
|
Enable VPA Using Cloud SDK and gcloud |
|
|
194 | (1) |
|
Manual Scaling Using Console (resize) |
|
|
194 | (4) |
|
Manual Scaling Using Cloud SDK and gcloud |
|
|
198 | (1) |
|
Scale Cloud Run and Cloud Build Containers |
|
|
198 | (11) |
|
Configure Auto-scaling with Cloud Run |
|
|
198 | (2) |
|
Configure Cloud Run Auto-scaling Using Cloud SDK and gcloud |
|
|
200 | (1) |
|
|
201 | (1) |
|
|
201 | (3) |
|
|
204 | (5) |
|
Scale GCP Container Registry |
|
|
209 | (1) |
|
Scale Compute Engine Hosts |
|
|
209 | (10) |
|
|
211 | (1) |
|
Auto-scaling Compute Engine Hosts |
|
|
211 | (8) |
|
|
219 | (2) |
Chapter 8 Chapter Monitoring |
|
221 | (38) |
|
Cloud Monitoring Overview |
|
|
221 | (1) |
|
|
221 | (1) |
|
|
222 | (1) |
|
|
222 | (1) |
|
|
222 | (1) |
|
Monitor Google Kubernetes Service (GKE) |
|
|
222 | (6) |
|
|
222 | (1) |
|
|
223 | (1) |
|
GKE Operations Suite Dashboard |
|
|
224 | (4) |
|
Monitor Cloud Run Containers |
|
|
228 | (10) |
|
|
229 | (1) |
|
|
230 | (3) |
|
|
233 | (5) |
|
Monitor Compute Engine Resources |
|
|
238 | (12) |
|
Install Agent on a Linux VM (Ubuntu) |
|
|
238 | (1) |
|
Install Agent on a Linux VM (CentOS) |
|
|
238 | (1) |
|
Install Agent on a Windows VM |
|
|
238 | (2) |
|
Create Service Account for Authorizing Agent |
|
|
240 | (7) |
|
|
247 | (1) |
|
|
247 | (3) |
|
|
250 | (8) |
|
|
253 | (2) |
|
|
255 | (1) |
|
|
256 | (1) |
|
|
257 | (1) |
|
|
258 | (1) |
Chapter 9 Chapter Backup and Restore |
|
259 | (26) |
|
Back Up Compute Engine VM Instances |
|
|
259 | (9) |
|
|
259 | (1) |
|
|
260 | (3) |
|
Create a Snapshot Using Cloud SDK and gcloud |
|
|
263 | (1) |
|
|
263 | (3) |
|
Attach VM Instance Disk to Snapshot |
|
|
266 | (2) |
|
Restore Compute Engine VM Instance |
|
|
268 | (4) |
|
Create a New Instance from a Snapshot |
|
|
268 | (2) |
|
|
270 | (2) |
|
Back Up Persistent Storage Disks (GKE) |
|
|
272 | (2) |
|
|
274 | (7) |
|
|
274 | (1) |
|
|
274 | (2) |
|
|
276 | (1) |
|
Add and Delete Files from Cloud Storage |
|
|
277 | (1) |
|
Configure or Add Retention Policy |
|
|
278 | (1) |
|
|
279 | (2) |
|
Back Up Compute Engine Resources |
|
|
281 | (2) |
|
|
283 | (2) |
Chapter 10 Chapter Troubleshooting |
|
285 | (16) |
|
|
285 | (2) |
|
|
285 | (1) |
|
|
286 | (1) |
|
|
286 | (1) |
|
Troubleshoot Google Kubernetes Service (GKE) |
|
|
287 | (4) |
|
|
287 | (1) |
|
|
288 | (2) |
|
|
290 | (1) |
|
Troubleshoot Cloud Run and Cloud Build Deployments |
|
|
291 | (4) |
|
|
292 | (2) |
|
|
294 | (1) |
|
Troubleshoot GCP Container Registry |
|
|
295 | (1) |
|
Troubleshoot Compute Engine Resource |
|
|
295 | (5) |
|
Select the Right Machine Family |
|
|
296 | (1) |
|
|
297 | (1) |
|
|
297 | (1) |
|
|
298 | (2) |
|
|
300 | (1) |
Index |
|
301 | |