apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: hostname
name: hostname
spec:
selector:
matchLabels:
run: hostname
template:
metadata:
labels:
run: hostname
spec:
containers:
- image: registry.k8s.io/e2e-test-images/agnhost:2.32
name: host1
args: ["serve-hostname", "--http=true", "--udp=false", "--port=8000"]
ports:
- protocol: TCP
containerPort: 8000
- image: registry.k8s.io/e2e-test-images/agnhost:2.32
name: host2
args: ["serve-hostname", "--http=true", "--udp=false", "--port=8080"]
ports:
- protocol: TCP
containerPort: 8080