by qbasic_forever · 3y ago · 0 comments
Kubernetes is perfect for this kind of scenario--Chick-fil-A HQ runs a k8s control plane that all of the stores and registers connect to as nodes and receive explicit code and other state to run. From a central command they can instantly update everything, monitor it, add/remove nodes, etc. They can do it all with just k8s and kubectl, they aren't bodging together piles of shell scripts, ansible scripts, custom tools, etc.
None of that works or even makes sense if you have end-user devices. Nodes are not interchangeable, you can't route around breakage (if one point of sale goes down, that's one physical device with a dark screen, adding one pod somewhere else won't help), the networking is mostly useless, zero-downtime impossible (you have only one physical screen to use, can't have two containers grab it during a rolling upgrade), service discovery is irrelevant unless you are running your database on those cash registers for some reason.
Use Ansible/Salt/... instead. Kubernetes is hype, and it's what people know, and it can technically do some of those things, but it's a terrible tool for this job.
What I'm trying to say, is:
> Nodes are not interchangeable
They don't have to be. You just need to make sure that certain pods run on all nodes that match certain criteria. That can be easily achieved with DaemonSets, taints and tolerations.
> you can't route around breakage (if one point of sale goes down, that's one physical device with a dark screen,
Sure, that's the same regardless of how you deploy software to the POS.
> adding one pod somewhere else won't help)
DaemonSets won't do that, so it's not a problem.
> the networking is mostly useless, zero-downtime impossible (you have only one physical screen to use, can't have two containers grab it during a rolling upgrade)
I believe your argument here is that k8s provides more features than what you need. That can be said about anything, all the way down to the hardware. Surely there's a lot of things the CPU on the POS can do that's mostly useless in this context.
> service discovery is irrelevant unless you are running your database on those cash registers for some reason.
Same as above, I guess...?
Have the clients update themselves when new releases are done. Have a backup access method, say, ssh if there are issues.
Corporate can pull all relevant data from couch to know the exact state of the distributed network.