top | item 26507262

(no title)

moufestaphio | 5 years ago

> I have a docker container. I deploy them on vm. I use load balancer to split traffic. Could you please walk me through what problem Kubernetes would solve here?

What happens when your VM dies? Kubernetes would automatically bring it back up. It has health checks, and knows when containers die/crash.

What happens when you need another docker container due to traffic? Again, Kubernetes fixes situations like this. Kubernetes has a lot of built in support around scaling etc.

Also, what if your docker container doesn't need a whole VM? Say you've got 5 different docker containers (which all scale independently), and lets say 3 VMs. Kubernetes will distribute them across those VMs based on there resource needs.

There's a lot more, but that's kind of what I think of when you say 'Orchestration of containers'.

discuss

order

drewp|5 years 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).

andrewstuart2|5 years ago

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.

systemvoltage|5 years ago

Thank you and everyone who has responded.