apiVersion: v1
kind: Pod
metadata:
  name: example-pod-affinity
spec:
  affinity:
    podAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
      – labelSelector:
          matchExpressions:
          – key: security
            operator: In
            values:
            – S1
        topologyKey: failure-domain.beta.kubernetes.io/zone
  containers:
  – name: pod-affinity
    image: your-container
