同节点就近
同节点就近
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: cache
topologyKey: kubernetes.io/hostnametopologyKey 决定「同域」的粒度:hostname 是同节点,zone 是同可用区。