Search code examples
cilium

Cilium topologyKey: kubernetes.io/hostname: pending pod, didn't match pod anti-affinity rules


I am trying to install Cilium, but I get error: didn't match pod anti-affinity rules

kubectl get pod cilium-operator-69b677f97c-m4rjw -n kube-system -o yaml

affinity:
    podAntiAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchLabels:
            io.cilium/app: operator
        topologyKey: kubernetes.io/hostname

I am running on a single node and have done(if that is an issue):

kubectl taint nodes --all node-role.kubernetes.io/control-plane-

Solution

  • You don't need affinity if you are running cilium on a single node