News for hackers. Stuff that matters.
Re:Reasons Kubernetes is so complex by torginus on Thursday January 27, 2022 @08:17AM (#30100163)
Just a funny thought exercise I did recently - I looked at our sizeable kubernetes cluster of 30ish VMs, and added up the core counts. It added up to 98. You can easily get a box that has this many (or more) cores. I wouldn't be surprised if our cloud provider analyzed the topology of the connections, and decided to put the whole thing on the same server.
Re:Reasons Kubernetes is so complex by nijave on Thursday January 27, 2022 @09:33AM (#30101021)
Sure, but then you can't, say, restart the server with no app downtime (for patches, maintenance, etc). You'd also probably have to setup cgroups yourself if you don't want to risk a rogue process taking up all the resources and starving other processes.

For AWS and GCP, there's zone-specific VM scaling groups that ensure you're in multiple AZs so you'd know for sure you're not on a single physical server.

Re:Reasons Kubernetes is so complex by bsagdiyev on Thursday January 27, 2022 @10:18AM (#30101536)
What is that nonsense? I literally restart apps in a rolling fashion on VMs all the time, no Kubernetes needed and no downtime in sight. This includes a full reboot of the VM itself.
Re:Reasons Kubernetes is so complex by anamexis on Thursday January 27, 2022 @10:19AM (#30101550)
They are talking about restarting the single server that all of your VMs are running on.
Re:Reasons Kubernetes is so complex by bsagdiyev on Thursday January 27, 2022 @10:45AM (#30101902)
Which can also be done with zero downtime to the VM.
Re:Reasons Kubernetes is so complex by RamRodification on Thursday January 27, 2022 @11:04AM (#30102162)
How do you restart a single server hosting VMs with zero downtime to the VMs?
Re:Reasons Kubernetes is so complex by bsagdiyev on Thursday January 27, 2022 @11:33AM (#30102537)
Did I misunderstand that the original post was regarding being able to do it with Kubernetes, not a few physical hosts? I didn't see "single" in the comment when I originally responded.
Re:Reasons Kubernetes is so complex by RamRodification on Thursday January 27, 2022 @03:47PM (#30106392)
Yeah, Top comment says

"You can easily get a box that has this many (or more) cores. I wouldn't be surprised if our cloud provider analyzed the topology of the connections, and decided to put the whole thing on the same server."

And the comment you replied to is referring to "the server"

Re:Reasons Kubernetes is so complex by cyberpunk on Thursday January 27, 2022 @11:33AM (#30102544)
VMware can do it by live migrating the vm, you will incur a short pause though, and the networking is a bit tricky to setup.. This of course doesn't happen during an unexpected downtime, it's a cold boot on another node in that case.
Re:Reasons Kubernetes is so complex by ted_dunning on Thursday January 27, 2022 @01:30PM (#30104223)
If you migrate a VM to a second hardware server then you have, by definition, a second server.

The question was how you reboot the posited singular hardware server with no downtime to any VMs running on it.

Re:Reasons Kubernetes is so complex by bpodgursky on Thursday January 27, 2022 @12:26PM (#30103332)
I have never seen this go smoothly on a production server; it's always WAY slower than expected (if you use any significant amount of memory) and something always gets f'd up wrt the network connectivity, broken caches, etc.
Re:Reasons Kubernetes is so complex by dekhn on Thursday January 27, 2022 @01:07PM (#30103869)
if I understand correctly, this is happening (nearly) transparently on GCP all the time. https://cloud.google.com/compute/docs/instances/live-migrati...

It involves copying the whole VM image over, and rewiring the network connections virtually on the fly.

I say (nearly) because it's not 100% transparent, but my understanding is that it works properly the vast majority of time.

Re:Reasons Kubernetes is so complex by bpodgursky on Thursday January 27, 2022 @02:33PM (#30105132)
Probably true but I'm also pretty sure Google isn't using VMware for live migrations under the good.
Re:Reasons Kubernetes is so complex by ryan_lane on Thursday January 27, 2022 @01:36PM (#30104301)
And what do you do when you need to restart the actual VM itself? You know, for when you need to patch the kernel and such...
Re:Reasons Kubernetes is so complex by hedora on Thursday January 27, 2022 @11:35AM (#30102582)
VMWare has had a high availability mode for over a decade. It keeps checkpoints of system state elsewhere and synchronously replicates them.

If the primary catches fire or crashes, the secondary boots the VM quickly without data loss.

If the primary reboots, it checkpoints RAM to the secondary pauses the VM and unpauses it on the secondary a few milliseconds later.

Note that this transparently handles storage replication, which is something that is notoriously difficult in Kubernetes.

If your cluster fits on one machine, you've paid for a lot of (currently) unnecessary complexity up front, both in dev time and in hardware cost.

If your app scales to need the cluster, congrats. Sometimes delaying time to market to allow for a smoother ramp makes sense. Sometimes it does not.

(Wikipedia is a good example of succeeding without ever needing to scale out the back end. I doubt they'd have won out over their competition if they took an extra 12-24 months to launch.)

Re:Reasons Kubernetes is so complex by felipelemos on Thursday January 27, 2022 @11:43AM (#30102720)
> VMWare has had a high availability mode for over a decade. It keeps checkpoints of system state elsewhere and synchronously replicates them.

So you don't have one VM's, but two. In case of Op's scenario you are paying for 196 CPUS instead of 98.

> If the primary reboots, it checkpoints RAM to the secondary pauses the VM and unpauses it on the secondary a few milliseconds later.

So a very small downtime, but not 0.

Re:Reasons Kubernetes is so complex by hedora on Thursday January 27, 2022 @05:09PM (#30107565)
It depends on your SLA. Under 10ms 99.9% of the time is pretty tight. Even if the migration takes a second, you'll meet your SLA for the hour.
Re:Reasons Kubernetes is so complex by sockpuppet69 on Thursday January 27, 2022 @11:37AM (#30102611)
So not 0 down time then
Re:Reasons Kubernetes is so complex by panzagl on Thursday January 27, 2022 @11:01AM (#30102125)
It's just like flying- throw yourself at the ground and miss...
Re:Reasons Kubernetes is so complex by bsagdiyev on Thursday January 27, 2022 @11:36AM (#30102603)
I responded above, either I missed the word "single" or it's been edited (but doesn't show it as being edited?) -- live migration between hypervisors is a thing.
Re:Reasons Kubernetes is so complex by mountainriver on Thursday January 27, 2022 @11:28AM (#30102467)
Also curious how this is possible
Re:Reasons Kubernetes is so complex by bsagdiyev on Thursday January 27, 2022 @11:35AM (#30102586)
I don't recall seeing "single" in the comment I replied to. You can live migrate VMs between hypervisors. Either I missed it or it's a dirty edit.
Re:Reasons Kubernetes is so complex by anamexis on Thursday January 27, 2022 @11:53AM (#30102873)
This is the relevant part of the root comment:

> You can easily get a box that has this many (or more) cores. I wouldn't be surprised if our cloud provider analyzed the topology of the connections, and decided to put the whole thing on the same server.

Re:Reasons Kubernetes is so complex by koffiezet on Thursday January 27, 2022 @10:59AM (#30102086)
Can you do that without knowing what apps are running on them? Your entire platform say "do a rolling update" and don't look back?

I wouldn't want to have paid for the engineering that went into that if you could actually do that.

Re:Reasons Kubernetes is so complex by secondcoming on Thursday January 27, 2022 @11:40AM (#30102666)
> Your entire platform say "do a rolling update" and don't look back?

Yes. GCP literally has a button that allows you to Replace/Restart all the instances in an Instance Group. Our deployment system just pushes a new GCP template and GCP does all the work rolling it out. No Kubernetes.

Re:Reasons Kubernetes is so complex by koffiezet on Friday January 28, 2022 @06:42AM (#30113437)
Yes there are other solutions out-there that have been pre-engineered, but he was talking about VM's and apps and rebooting them. Doesn't sound like instance groups to me.
Re:Reasons Kubernetes is so complex by bsagdiyev on Thursday January 27, 2022 @11:38AM (#30102627)
If things are architected to be updated in a rolling fashion. If it's some single node app you're screwed. But we're talking about K8s so I would hope you're using it for its purpose and not some tiny cluster for a 3 request per minute app.
Re:Reasons Kubernetes is so complex by res0nat0r on Thursday January 27, 2022 @01:03PM (#30103824)
Re:Reasons Kubernetes is so complex by koffiezet on Friday January 28, 2022 @06:28AM (#30113339)
I was talking about doing this on non-k8s platforms :)
Re:Reasons Kubernetes is so complex by hedora on Thursday January 27, 2022 @11:53AM (#30102862)
Yes. You can do this without knowing about or modifying the applications. There was a big push for hardware consolidation a decade or so ago, where legacy apps were crammed on to fewer and fewer machines, and were cheaper/faster/more reliable as a result.

However, a permanent machine failure or unexpected reboot implies a few seconds or minutes of downtime.

These systems usually use a local disk, a synchronously updated disk across town (low latency, but on a different power grid, outside most natural disaster blast radii), and a far away asynchronously updated disaster recovery disk.

The disaster recovery disk provides a crash-consistent state that's less than a few seconds out of date.

These days, the "disks" tend to be deduped and compressed SSD's that use parity encoded raid. Their hardware cost is lower than a single copy on ext4, but they come with an enterprise tax / support contract, etc.

In practice, it's durable unless corporate HQ is wiped out. If that happens, it won't be the weak link in your business continuity plan (but a few customers' orders might've been dropped).

This stuff is tremendously unsexy, but it'll plug along just fine until you have some workload that can't be partitioned, and that needs more than roughly 40-100gbit of network/disk bandwidth, 128 cores, or 1TB of DRAM.

(Edit: Forgot to mention that the the apps run inside a VM infrastructure that supports live migration.)

Re:Reasons Kubernetes is so complex by koffiezet on Friday January 28, 2022 @06:54AM (#30113529)
Well, I didn't claim it was impossible, I only claimed I wouldn't want to pay for the engineering that would go into enabling this when building that from scratch. But there are of course alternatives to k8s which also enable this.
Re:Reasons Kubernetes is so complex by dosethree on Thursday January 27, 2022 @11:45AM (#30102747)
for stateless apps (with HA, capacity etc) its easy
Re:Reasons Kubernetes is so complex by glintik on Thursday January 27, 2022 @09:45AM (#30101160)
> you can't, say, restart the server with no app downtime You can, on properly configured server. Cloud named cloud due to it allows to do such things - VM migration from one host to another one flawlessly.
Re:Reasons Kubernetes is so complex by rhplus on Thursday January 27, 2022 @09:06AM (#30100716)
This would all depend on your risk tolerance and fail-over plan. On Azure, for example, K8S node pools run on VM Scale Sets. By enabling Availability Zone distribution for those VMs, you could at least keep part of your node pool up if one zone in the region went down:

https://docs.microsoft.com/en-us/azure/aks/availability-zone...

Re:Reasons Kubernetes is so complex by darkwater on Thursday January 27, 2022 @09:00AM (#30100641)
So if that host goes down you are screwed? Would not be a wise decision from your cloud provider. Although thinking about it twice, usually cloud providers response in such a case would be a shrug and that's all...
Re:Reasons Kubernetes is so complex by KptMarchewa on Thursday January 27, 2022 @11:49AM (#30102803)
I very doubt that would happen. Even if, at the very least, control plane would be distributed, so host going down would just cause another underlying VM to spawn and everything being recreated.
Re:Reasons Kubernetes is so complex by jordanthoms on Thursday January 27, 2022 @08:57AM (#30100595)
I guess it's all relative, our largest cluster scales up to around 3000 VCPU and there's plenty of much larger ones out there.

You might be able to get better utilisation of your VMs by running a smaller number with more cores on each - I'd try 16vcpu nodes.

Re:Reasons Kubernetes is so complex by randomswede on Friday January 28, 2022 @04:17AM (#30112419)
At my previous workplace, one of the clusters I herded was 60-odd (physical) machines, 72 or 96 cores (honestly can't recall at this point) and 384 GB RAM (IIRC) per physical server. But, that place was a wee bit strange, in that we ran all our kubernetes in-house and started on bare metal.

And, yes, as a general recommendation, I would tend towards bigger, rather than smaller, nodes. There's a trade-off to be had, but you want each node to be at LEASt as large as the largest pod you intend to deploy, and you probably want at least some spare, on top of that.

Re:Reasons Kubernetes is so complex by honkycat on Thursday January 27, 2022 @12:22PM (#30103287)
And managing dozens of apps on a giant VM using raw chroots and cgroups and your own scripting is desirable to Kubernetes?

I don't see what you win here. I don't want to have to write my own rolling updates, canary deployments, networking/traffic/load balancing scripts, configuration/secret management, dependency management, log aggregation, user management, etc.

I just spin up a Kubernetes cluster, create service accounts for my users, and let them use the k8s docs and declarative primitives to ship their code. If I'm lucky they are already familiar with the system from their last job, so they can bring expertise with them.

Re:Reasons Kubernetes is so complex by numbsafari on Thursday January 27, 2022 @11:49AM (#30102805)
Kubernetes has the ability to allow you to prevent this. At the very least, to tell your operator to not do this.

You can use inter-pod affinity and anti-affinity[1] to basically say "don't run the instances of this scaling group on the same physical nodes". Then, when the physical VMs are upgraded for whatever reason, the cluster knows not to bin all the Pods hosting your blog onto the same physical node.

Combined with how, e.g., Google handles node upgrades, means that I can keep services up and running pretty seamlessly without a lot of work. In fact, I haven't had downtime due to an upgrade of the underlying nodes or VMs in over 6 years, despite Google regularly updating the underlying nodes to newer host OS and kubelet versions.

You can also use node selectors[2] and related configurations to run specific pods on specific nodes or types of nodes (e.g., only run this pod on a node with a fast disk).

We do this with all of our Jobs. They are assigned to nodes in an autoscaling nodepool that scales down to zero. So, those nodes are only ever in use when we have jobs running, and jobs coming and going doesn't create any thrashing amongst our long running services.

Of course, your cluster operator could ignore all that somehow, but then when you have unexpected downtime during a machine or VM host upgrade, you'll be pretty peeved.

You do bring up a good point regarding node core counts. If you are running "30ish VMs ~= 98 cores", then you are probably running 2 and/or 4 core nodes. You may actually want to run "fatter" nodes with higher core counts. Keep in mind that each node is going to have dedicated resources for the kubelet, and any daemonset pods, which can add up pretty quickly sometimes. You may actually be wasting quite a bit of resources to overly redundant overhead. You may also suffer from slower scale-ups because you have to add a lot more individual nodes when things start to ramp up. There's a balance to find, not just with perf and overhead but with resiliency, but it's something I see a lot of folks overlook because they think they want to have super fine-grained node scaling.

[1] https://kubernetes.io/docs/concepts/scheduling-eviction/assi...

[2] https://kubernetes.io/docs/concepts/scheduling-eviction/assi...

Re:Reasons Kubernetes is so complex by sgtfrankieboy on Thursday January 27, 2022 @09:16AM (#30100807)
Probably need less cores for the same performance. Its never entirely clear what a "vCPU" is.
Re:Reasons Kubernetes is so complex by KptMarchewa on Thursday January 27, 2022 @11:37AM (#30102623)
It's one hyperthread core on x86 and full core on ARM.
Re:Reasons Kubernetes is so complex by hpjules on Thursday January 27, 2022 @09:47AM (#30101187)
In AWS EC2 you can avoid that not just by spreading across different zones but also using placement groups so nodes are placed in different racks.
Re:Reasons Kubernetes is so complex by talideon on Thursday January 27, 2022 @01:12PM (#30103946)
If your cloud provider is scheduling everything on the same server, they're doing something very, _very_ wrong.
Re:Reasons Kubernetes is so complex by antishatter on Thursday January 27, 2022 @10:42AM (#30101854)
I would be astonished if what you say is true