You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/multiarch_nginx_on_aks/3-deploy-arm.md
+62-44Lines changed: 62 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,12 @@ layout: learningpathall
8
8
9
9
## Add ARM deployment and service
10
10
11
-
In this section, you'll add nginx on ARM nodes to your existing cluster, completing your multi-architecture Intel/AMD/ARM environment for comprehensive performance comparison.
11
+
In this section, you'll add nginx on ARM nodes to your existing cluster, completing your multi-architecture Intel/ARM environment for comprehensive performance comparison.
12
+
13
+
The **arm_nginx.yaml** file creates the following K8s objects:
14
+
-**ConfigMap** (`nginx-arm-config`) - Contains performance-optimized nginx configuration with ARM-specific tuning
15
+
-**Deployment** (`nginx-arm-deployment`) - Pulls the multi-architecture nginx image from DockerHub, launches a pod on the ARM node, and mounts the ConfigMap as `/etc/nginx/nginx.conf`
16
+
-**Service** (`nginx-arm-svc`) - Load balancer targeting pods with both `app: nginx-multiarch` and `arch: arm` labels
12
17
13
18
Copy and paste the following commands into a terminal to download and apply the ARM deployment and service:
Taking a closer look at the `arm_nginx.yaml` deployment file, you'll see settings optimized for ARM architecture:
36
+
37
+
* The `nodeSelector``kubernetes.io/arch: arm64`. This ensures that the deployment only runs on ARM nodes, utilizing the arm64 version of the nginx container image.
33
38
34
-
* A new deployment called `nginx-arm-deployment` is created. This deployment pulls the same multi-architecture nginx image from DockerHub.
39
+
```yaml
40
+
spec:
41
+
nodeSelector:
42
+
kubernetes.io/arch: arm64
43
+
```
44
+
45
+
* The service selector uses both `app: nginx-multiarch` and `arch: arm` labels to target only ARM pods. This dual-label approach allows for both architecture-specific and multi-architecture service routing.
46
+
47
+
```yaml
48
+
selector:
49
+
app: nginx-multiarch
50
+
arch: arm
51
+
```
35
52
36
-
Of particular interest is the `nodeSelector``agentpool`, with the value of `arm`. This ensures that the deployment only runs on ARM nodes, utilizing the arm64 version of the nginx container image.
53
+
* The ARM ConfigMap includes performance optimizations specific to ARM architecture, such as `worker_processes 2` and `worker_cpu_affinity 01 10` for optimal CPU core utilization.
37
54
38
-
* A new load balancer service `nginx-arm-svc` is created, targeting all pods with the `arch: arm` label (the ARM deployment creates these pods).
55
+
### Verify the deployment
39
56
40
-
### Apply the ARM deployment and service
57
+
### Verify the deployment
41
58
42
-
1.Run the following command to apply the ARM deployment and service:
59
+
1. Get the status of nodes, pods and services by running:
43
60
44
61
```bash
45
-
kubectl apply -f arm_nginx.yaml
62
+
kubectl get nodes,pods,svc -nnginx
46
63
```
47
64
48
-
You see the following response:
65
+
Your output should be similar to the following, showing two nodes, two pods, and two services:
If you see the output `Welcome to nginx!` and the pod log shows `nginx-arm-deployment`, you have successfully added ARM nodes to your cluster running nginx.
117
+
If you see output similar to above, you have successfully added ARM nodes to your cluster running nginx.
99
118
100
-
### Compare all architectures
119
+
### Compare both architectures
101
120
102
-
Now you can test all three architectures and compare their responses:
121
+
Now you can test both architectures and compare their responses:
0 commit comments