Can I reduce the time of containercreating period in Kubernetes?

Viewed 176

When we run kubectl apply -f, we create a new pod in Kubernetes. But it takes about 5 seconds to arrive Running status even though the image has been already pulled in the node. Before that, the pod is in containercreating status. I Run kubectl describe to see the events and found that the scheduling is very fast but the gap between scheduled and imagepulling is about 3 seconds , and the container starting time is about 2 seconds. I wonder if I can reduce the time of containercreating time. Thank you!

1 Answers

The target latency between Creation to Running is ~5 sec (if the image is pre-pulled). Your Pods' creation times are meeting both the scheduling time goal and the API latency goal. There was a discussion regarding that topic which resulted in the current SLA. And further Enhancement Proposals (example) are rejected.

However you may want to review the Scheduler Performance Tuning but bear in mind that it would be relevant for large Kubernetes clusters mainly.

Related