Hacker News new | ask | show | jobs
by drewp 1917 days ago
A funny phenomenon I noticed on my home setup:

If you start a deployment ("your container", roughly speaking), the age of that deployment will keep counting up even if the container exits-- k8s restarts it of course-- and even if the k8s scheduler goes down-- since we want to be able to restart the scheduler without unnecessary service restarts.

At home, it's all on one computer in my basement, so when I reboot that box, the k8s reports come back and keep telling me the deployment has been there for xx days (just with some availability hiccups).

1 comments

That's because the Deployment has been up that long. Now, the Pods created from the pod template inside the deployment will not have nearly the same age as the Deployment, because they're much more likely to change as the Deployment spec changes or as Nodes come and go.

Even with a reboot, most OCR implementations (docker daemon, eg) will keep a pod around for 10 minutes until they reschedule it, so you'd see a restart count for the pod but probably not even a different age. It's tunable but IIRC 10 minutes is the default.