Open
Description
Tested in EKS 1.24
Verified with the following setup .
curling the imported service from an ubuntu pod will show that it's randomly distributed across the 2 pods.
Expects imported service to respect topology awareness and hits only 1 pod.
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: monitoring
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- nginx
topologyKey: failure-domain.beta.kubernetes.io/zone
---
kind: Service
apiVersion: v1
metadata:
namespace: monitoring
name: nginx-service
annotations:
service.kubernetes.io/topology-aware-hints: Auto
spec:
selector:
app: nginx
ports:
- port: 80
Metadata
Metadata
Assignees
Labels
No labels