Skip to content

Commit f154ec7

Browse files
committed
Extract multiarch service YAML to repo, use curl + kubectl pattern
1 parent 40c5b23 commit f154ec7

1 file changed

Lines changed: 3 additions & 30 deletions

File tree

content/learning-paths/servers-and-cloud-computing/multiarch_nginx_on_aks/4-deploy-multiarch.md

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,12 @@ You now have nginx running on Intel, AMD, and ARM nodes with architecture-specif
1212

1313
### Create the multiarch service
1414

15-
1. Use a text editor to copy the following YAML and save it to a file called `multiarch_nginx.yaml`:
16-
17-
```yaml
18-
apiVersion: v1
19-
kind: Service
20-
metadata:
21-
name: nginx-multiarch-svc
22-
namespace: nginx
23-
spec:
24-
sessionAffinity: None
25-
ports:
26-
- nodePort: 30083
27-
port: 80
28-
protocol: TCP
29-
targetPort: 80
30-
selector:
31-
app: nginx-multiarch
32-
type: LoadBalancer
33-
```
34-
35-
When the above is applied:
36-
37-
* A new load balancer service `nginx-multiarch-svc` is created, targeting all pods with the `app: nginx-multiarch` label (all nginx deployments share this label).
38-
39-
* The service uses `sessionAffinity: None` to ensure requests are distributed across all available pods without stickiness.
40-
41-
* This service can route to Intel, AMD, or ARM pods based on availability and load balancing algorithms.
42-
43-
### Apply the multiarch service
15+
The multiarch service targets all pods with the `app: nginx-multiarch` label (all nginx deployments share this label). It uses `sessionAffinity: None` to ensure requests are distributed across all available pods without stickiness, and can route to Intel, AMD, or ARM pods based on availability and load balancing algorithms.
4416

45-
1. Run the following command to apply the multiarch service:
17+
1. Run the following command to download and apply the multiarch service:
4618

4719
```bash
20+
curl -sO https://raw.githubusercontent.com/geremyCohen/nginxOnAKS/main/multiarch_nginx.yaml
4821
kubectl apply -f multiarch_nginx.yaml
4922
```
5023

0 commit comments

Comments
 (0)