One memcached pod always pending

helm install --name memcached stable/memcached

memcached-0 1/1 Running 0 15m 10.244.60.2 eloquent-beaver-8as6
memcached-1 1/1 Running 0 15m 10.244.51.7 eloquent-beaver-8ast
memcached-2 0/1 Pending 0 15m

kubectl describe pod memcached-2

Warning FailedScheduling 51s (x25 over 17m) default-scheduler 0/2 nodes are available: 2 node(s) didn’t match pod affinity/anti-affinity, 2 node(s) didn’t satisfy existing pods anti-affinity rules.

I tried reinstalling but it didn’t help. I have two nodes.

Well, the error message is telling you all you need to know: the scheduler cannot find placement for more than two Pods, because you only have two hosts, and you are using the default “hard” anti-affinity configuration. In that mode, the scheduler is not allowed to place two memcached Pods on the same node. Since you have fewer nodes (2) than the standard replica count (3), it can’t proceed.

Either use the “soft” mode, increase the size of your cluster, or decrease the required number of memcached Pods if you want this error to go away.

3 Likes