Skip to content

Commit da5d24d

Browse files
Merge pull request #2530 from madeline-underwood/gke_multi_arch_axion
Gke multi arch axion_JA to sign off
2 parents 474fafd + 45d9ebd commit da5d24d

File tree

7 files changed

+157
-112
lines changed

7 files changed

+157
-112
lines changed

content/learning-paths/servers-and-cloud-computing/gke-multi-arch-axion/_index.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
---
2-
title: From x86 to Arm on GKE - Build, Deploy, and Migrate with Google Axion
3-
4-
draft: true
5-
cascade:
6-
draft: true
2+
title: Migrate x86 workloads to Arm on Google Kubernetes Engine with Axion processors
73

84
minutes_to_complete: 90
95

10-
who_is_this_for: This is an advanced topic for cloud, platform, and site reliability engineers operating Kubernetes on Google Cloud who need a prescriptive path to build multi-architecture images and migrate services from x86 to Arm using Google Axion processors.
6+
who_is_this_for: This is an advanced topic for cloud, platform, and site reliability engineers who operate Kubernetes on Google Cloud and need to build multi-architecture images and migrate services from x86 to Arm using Google Axion processors.
117

128
learning_objectives:
139
- Prepare Dockerfiles for multi-architecture builds by adding arm64 support
14-
- Create a dual-architecture GKE standard cluster with two node pools, amd64 and arm64
15-
- Build and publish multi-architecture images to Artifact Registry using Docker Buildx without using QEMU to emulate Arm instructions
16-
- Deploy a Kubernetes application amd64 first, then migrate to arm64 using Kustomize overlays and progressive rollout
17-
- Optionally automate builds and rollouts with Cloud Build and Skaffold
10+
- Create a dual-architecture GKE standard cluster with amd64 and arm64 node pools
11+
- Build and publish multi-architecture images to Artifact Registry using Docker Buildx
12+
- Deploy a Kubernetes application on amd64, then migrate to arm64 using Kustomize overlays
13+
- Automate builds and rollouts with Cloud Build and Skaffold
1814

1915
prerequisites:
2016
- A [Google Cloud account](https://console.cloud.google.com/) with billing enabled
21-
- A local Linux or macOS computer or Cloud Shell access with Docker, Kubernetes CLI (kubectl), Google Cloud CLI (gcloud), and Git installed
17+
- A local Linux or macOS computer with Docker, Kubernetes CLI (kubectl), Google Cloud CLI (gcloud), and Git installed, or access to Google Cloud Shell
2218
- Basic familiarity with Docker, Kubernetes, and gcloud
2319

2420
author:
@@ -40,11 +36,11 @@ tools_software_languages:
4036

4137
further_reading:
4238
- resource:
43-
title: GKE documentation
39+
title: Google Kubernetes Engine documentation
4440
link: https://cloud.google.com/kubernetes-engine/docs
4541
type: documentation
4642
- resource:
47-
title: Create Arm-based clusters and node pools
43+
title: Create standard clusters and node pools with Arm nodes
4844
link: https://cloud.google.com/kubernetes-engine/docs/how-to/create-arm-clusters-nodes
4945
type: documentation
5046

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
# User change
3+
title: "Explore the benefits of migrating microservices to Arm on GKE"
4+
5+
weight: 2
6+
7+
# Do not modify these elements
8+
layout: "learningpathall"
9+
---
10+
11+
## Overview
12+
13+
This Learning Path shows you how to migrate a microservices application from x86 to Arm on Google Kubernetes Engine (GKE) using multi-architecture container images. You'll work with Google's Online Boutique, a sample application built with multiple programming languages. The migration requires no code changes, making it a straightforward example of moving to Arm-based Google Axion processors.
14+
15+
16+
## Why use Google Axion processors for GKE?
17+
18+
Google Axion processors bring modern Arm-based compute to GKE. You get strong price-performance and energy efficiency for cloud-native, scale-out services. With multi-architecture images and mixed node pools, you can migrate services from x86 to Arm gradually, with no major code changes.
19+
20+
## What is Google Axion?
21+
22+
[Google Axion](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu) is Google Cloud's Arm-based CPU family built on Arm Neoverse, for general-purpose, cloud-native services and CPU-based AI. You can deploy it for workloads like web apps and web servers, containerized microservices, open-source databases, in-memory caches, data analytics, media processing, and CPU-based AI inference and data processing. On GKE, you can leverage Axion through the C4A and N4A VM families, paired with Google's Titanium offloads to free CPU cycles for application work.
23+
24+
## Why migrate to Arm on GKE?
25+
There are three clear benefits to consider when considerring migrating to Arm on GKE:
26+
27+
- Price-performance: you can run more workload per unit of cost, which is particularly valuable for scale-out services that need to handle increasing traffic efficiently.
28+
- Energy efficiency: you reduce power usage for always-on microservices, lowering both operational costs and environmental impact.
29+
- Compatibility: you can migrate containerized applications with build and deploy changes only—no code rewrites are required, making the transition straightforward.
30+
31+
## Learn about the Online Boutique sample application
32+
33+
[Online Boutique](https://github.com/GoogleCloudPlatform/microservices-demo) is a polyglot microservices storefront, complete with shopping cart, checkout, catalog, ads, and recommendations. It's implemented in Go, Java, Python, .NET, and Node.js, with ready-to-use Dockerfiles and Kubernetes manifests. It's a realistic example for demonstrating an x86 to Arm migration with minimal code changes.
34+
35+
## Multi-architecture on GKE (pragmatic path)
36+
37+
This Learning Path demonstrates a practical migration approach using Docker Buildx with a Kubernetes driver. Your builds run natively inside BuildKit pods on GKE node pools—no QEMU emulation needed. You'll add an Arm node pool alongside your existing x86 nodes, then use node selectors and affinity rules to control where services run. This lets you migrate safely, one service at a time.
38+
39+
## How this Learning Path demonstrates migration
40+
41+
You'll migrate the Online Boutique application from x86 to Arm step by step. You'll build multi-architecture container images and use mixed node pools, so you can test each service on Arm before you fully commit to the migration.
42+
43+
The migration process involves these steps:
44+
45+
- Open Google Cloud Shell and set up the environment variables.
46+
- Enable required APIs, create an Artifact Registry repository, and authenticate Docker.
47+
- Create a GKE Standard cluster with an amd64 node pool and add an arm64 (Axion-based C4A) node pool.
48+
- Create a Buildx (Kubernetes driver) builder that targets both pools, then build and push multi-architecture images (amd64 and arm64) natively using BuildKit pods.
49+
- Deploy to amd64 first (Kustomize overlay), validate, then migrate to arm64 (overlay) and verify.
50+
- Automate builds and rollouts with Cloud Build and Skaffold.

content/learning-paths/servers-and-cloud-computing/gke-multi-arch-axion/cloud-build.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
---
22
title: Automate builds and rollout with Cloud Build and Skaffold
3-
weight: 6
3+
weight: 7
44

55
### FIXED, DO NOT MODIFY
66
layout: learningpathall
77
---
88

9-
Google [**Cloud Build**](https://cloud.google.com/build/docs/set-up) is a managed CI/CD service that runs your containerized build and deploy steps in isolated runners.
9+
## Automate the deployment with Cloud Build
1010

11-
In this section, you'll automate the flow you performed manually: build multi-arch images, deploy to GKE on amd64, then migrate to arm64, and print the app's external IP.
11+
Google [Cloud Build](https://cloud.google.com/build/docs/set-up) is a managed CI/CD service that runs your containerized build and deploy steps in isolated runners.
12+
13+
In this section, you automate the flow you performed manually: build multi-arch images, deploy to GKE on amd64, then migrate to arm64, and print the app's external IP.
1214

1315
## What does this pipeline do?
1416

@@ -19,9 +21,8 @@ The pipeline performs the following steps:
1921
- Connects to your GKE cluster
2022
- Applies the amd64 Kustomize overlay, verifies pods, then applies the arm64 overlay and verifies pods again
2123
- Prints the frontend-external LoadBalancer IP at the end
22-
2324
{{% notice Tip %}}
24-
Run this from the microservices-demo repo root in Cloud Shell. Ensure you completed the previous steps.
25+
Run this command from the `microservices-demo` repository root in Cloud Shell. Make sure you've completed the previous steps.
2526
{{% /notice %}}
2627

2728
## Grant IAM permission to the Cloud Build service account
@@ -110,7 +111,7 @@ YAML
110111

111112
This pipeline installs Docker with Buildx in the runner, enables QEMU, builds two services as examples (extend as desired), connects to your cluster, deploys to amd64, verifies, migrates to arm64, verifies, and prints the external IP. 
112113

113-
Run the commands to create the `cloudbuild.yaml` file.
114+
Run the commands to create the `cloudbuild.yaml` file:
114115

115116
```yaml
116117
cat > cloudbuild.yaml <<'YAML'
@@ -263,3 +264,33 @@ Open http://<EXTERNAL-IP> in your browser.
263264
```
264265

265266
Open the URL to load the storefront and confirm the full build, deploy, and migrate flow is automated.
267+
268+
## What you've accomplished
269+
270+
Congratulations! You've successfully automated the entire build, deploy, and migration workflow using Cloud Build and Skaffold. Your multi-architecture application runs natively on Arm-powered GKE nodes, and you can deploy updates automatically with a single command.
271+
272+
You've learned how to:
273+
274+
- Update Dockerfiles to support native builds on both amd64 and arm64 architectures
275+
- Create a dual-architecture GKE cluster with separate node pools for each platform
276+
- Build multi-architecture container images using Docker Buildx with native BuildKit pods
277+
- Deploy applications to amd64 nodes, then migrate them to arm64 nodes using Kustomize overlays
278+
- Automate the entire workflow with Cloud Build and Skaffold for continuous deployment
279+
280+
## What's next
281+
282+
Now that you have a working multi-architecture deployment pipeline, you can explore these next steps:
283+
284+
- Optimize for Arm performance: profile your services on arm64 nodes to identify optimization opportunities. Arm Neoverse processors offer different performance characteristics than x86, so you might discover new ways to improve throughput or reduce latency.
285+
286+
- Expand your migration: add build steps for the remaining Online Boutique services. You can extend the `cloudbuild.yaml` file to build all services, not just the two examples provided.
287+
288+
- Implement progressive rollouts: use Skaffold profiles and Cloud Build triggers to set up canary deployments or blue-green deployments across architectures. This lets you test changes on a subset of traffic before rolling out to all users.
289+
290+
- Monitor architecture-specific metrics: set up monitoring dashboards in Cloud Monitoring to compare performance, resource usage, and cost between amd64 and arm64 deployments. This data helps you make informed decisions about your migration strategy.
291+
292+
- Explore cost optimization: review your GKE cluster costs and consider rightsizing your node pools. Arm-based C4A instances often provide better price-performance for cloud-native workloads, so you might reduce costs while maintaining or improving performance.
293+
294+
295+
296+

content/learning-paths/servers-and-cloud-computing/gke-multi-arch-axion/gke-build-push.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
2-
title: Provision a dual-architecture GKE cluster and publish images
3-
weight: 4
2+
title: Build and deploy multi-architecture images on GKE
3+
weight: 5
44

55
### FIXED, DO NOT MODIFY
66
layout: learningpathall
77
---
88

9+
## Create a cluster and build the multi-arch images
10+
911
You are ready to create a GKE cluster with two node pools (amd64 and arm64), then build and push multi-arch images natively on those node pools.
1012

1113
Each architecture uses its own BuildKit pod, and no QEMU emulation is required.
@@ -40,7 +42,7 @@ This approach prevents users on the default VPC from accidentally setting NETWOR
4042

4143
Create a GKE Standard cluster with VPC-native (IP aliasing) enabled and no default node pool. You'll add amd64 and arm64 pools in the next step.
4244

43-
The command below works for both default and custom VPCs. If the NETWORK, SUBNET, and secondary range variables are unset, GKE uses the default VPC and manages ranges automatically.
45+
The command below works for both default and custom VPCs. If the NETWORK, SUBNET, and secondary range variables are unset, GKE uses the default VPC and manages ranges automatically:
4446

4547
```bash
4648
# Cluster vars (reuses earlier PROJECT_ID/REGION/ZONE)

content/learning-paths/servers-and-cloud-computing/gke-multi-arch-axion/gke-deploy.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
22
title: Prepare manifests and deploy on GKE
3-
weight: 5
3+
weight: 6
44

55
### FIXED, DO NOT MODIFY
66
layout: learningpathall
77
---
8+
## Prepare deployment manifests
89

9-
You'll now configure the application manifests to use your Artifact Registry images and create Kustomize overlays for different CPU architectures. This allows you to deploy the same application to both x86 and Arm node pools.
10+
You'll now configure the application manifests to use your Artifact Registry images and create Kustomize overlays for different CPU architectures. This allows you to deploy the same application to both x86 and Arm node pools by replacing sample image references with your Artifact Registry path and tag, then creating overlays to select nodes by architecture.
1011

11-
## Prepare deployment manifests
1212

13-
Replace sample image references with your Artifact Registry path and tag, then create Kustomize overlays to select nodes by architecture.
13+
## Update base manifests to use your images
1414

15-
### Point base manifests at your images
15+
Replace the sample image references in the base manifests with your Artifact Registry path and tag:
1616

1717
Replace the image references with your references:
1818

@@ -29,7 +29,10 @@ find kustomize/base -name "*.yaml" -type f -exec \
2929
grep -r "${GAR}" kustomize/base/ || true
3030
```
3131

32-
### Create node-selector overlays
32+
You’ve updated your deployment manifests to reference your own Artifact Registry images. This ensures your application uses the multi-architecture containers you built for Arm and x86.
33+
34+
35+
## Create node-selector overlays
3336

3437
Create node-selector overlays for targeting specific architectures.
3538

@@ -79,7 +82,7 @@ cat << 'EOF' > kustomize/overlays/arm64/node-selector.yaml
7982
EOF
8083
```
8184

82-
You now have updated manifests that reference your container images and Kustomize overlays that target specific CPU architectures.
85+
You’ve updated your deployment manifests to reference your own Artifact Registry images. This ensures your application uses the multi-architecture containers you built for Arm and x86.
8386

8487
## Deploy to the x86 (amd64) pool
8588

@@ -101,6 +104,8 @@ kubectl get pods -o=custom-columns=NAME:.metadata.name,NODE:.spec.nodeName,STATU
101104

102105
Pods should be scheduled on nodes labeled `kubernetes.io/arch=amd64`.
103106

107+
You’ve deployed your application to the x86 node pool and verified pod placement. This confirms your manifests and overlays work as expected before migrating to Arm.
108+
104109
## Migrate to the Arm (arm64) pool
105110

106111
Apply the arm64 overlay to move workloads:
@@ -117,6 +122,8 @@ kubectl get pods -o wide
117122

118123
You should see pods now running on nodes where `kubernetes.io/arch=arm64`.
119124

125+
You’ve migrated your workloads to the Arm node pool. Pods now run on Arm-based nodes, demonstrating a successful architecture transition.
126+
120127
## Verify external access
121128

122129
Get the LoadBalancer IP and open the storefront:
@@ -138,5 +145,5 @@ Copy the EXTERNAL-IP value and open it in a new browser tab:
138145
http://<EXTERNAL-IP>
139146
```
140147

141-
The microservices storefront loads, confirming that your application is accessible and functional on the arm64 node pool.
148+
The microservices storefront loads, confirming that your application is accessible and functional on the arm64 node pool. You’re now running a production-ready microservices storefront on Arm-powered GKE infrastructure.
142149

0 commit comments

Comments
 (0)