diff --git a/config/core/deployments/activator.yaml b/config/core/deployments/activator.yaml index 9316d8f68ae2..6b5d4f2a7802 100644 --- a/config/core/deployments/activator.yaml +++ b/config/core/deployments/activator.yaml @@ -35,6 +35,17 @@ spec: app.kubernetes.io/name: knative-serving app.kubernetes.io/version: devel spec: + # To avoid node becoming SPOF, spread our replicas to different nodes. + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app: activator + topologyKey: kubernetes.io/hostname + weight: 100 + serviceAccountName: activator containers: - name: activator