Oleg Atamanenko

thoughts about programming

Causes of UnexpectedAdmissionError in Kubernetes

Recently I found that sometimes kubernetes pods are not starting. They were failing with the enigmatic UnexpectedAdmissionError. Time to deep dive into what may cause it.

After searching through the kubernetes codebase I found several places where this status was set.

As of Kubernetes 1.19, this error will be set in the following cases:

  1. CPU Manager can’t admit the pod.
  2. Device Manager can’t admit the pod.
  3. Topology Manager can’t admit the pod.
  4. Unable to provision extended resource
  5. Plugin Resource failure.
  6. Pod can’t be admitted due to unknown reasons.

In my particular case, it was caused by CPU Manager - there were CPU and Memory to admit the pod, but it was impossible to give the pod an exclusive number of CPUs.