kubernetes/test/integration/scheduler_perf/config/templates/pod-with-pod-affinity.yaml

apiVersion: v1
kind: Pod
metadata:
  generateName: affinity-pod-
  labels:
    color: blue
spec:
  affinity:
    podAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchLabels:
            color: blue
        topologyKey: topology.kubernetes.io/zone
        namespaces: ["sched-1", "sched-0"]
  containers:
  - image: registry.k8s.io/pause:3.10
    name: pause
    ports:
    - containerPort: 80
    resources:
      limits:
        cpu: 100m
        memory: 500Mi
      requests:
        cpu: 100m
        memory: 500Mi