...
1apiVersion: apps/v1
2kind: Deployment
3metadata:
4 labels:
5 run: hostname
6 name: hostname
7spec:
8 selector:
9 matchLabels:
10 run: hostname
11 template:
12 metadata:
13 labels:
14 run: hostname
15 spec:
16 containers:
17 - image: registry.k8s.io/e2e-test-images/agnhost:2.32
18 name: host1
19 args: ["serve-hostname", "--http=true", "--udp=false", "--port=8000"]
20 ports:
21 - protocol: TCP
22 containerPort: 8000
23 - image: registry.k8s.io/e2e-test-images/agnhost:2.32
24 name: host2
25 args: ["serve-hostname", "--http=true", "--udp=false", "--port=8080"]
26 ports:
27 - protocol: TCP
28 containerPort: 8080
View as plain text