Two ways to run Kubernetes on apple/container — Talos (embedded etcd) and k3s (external-etcd HA) #1865
Replies: 3 comments 7 replies
Surely having one VM per node is the standard deployment? Like how minikube did it, before kind. It was Kata containers and now Apple container that went back to the one VM per container model... I thought it would be an interesting concept of having one VM per pod, as a compromise between the two. |
|
Coming back to this on The first-party path that landed is the I have not re-run k3ac against 1.3.1. The 1.3.1 notes are security / containerization 0.42.0 — nothing that obviously retires the landmines you named. From here they still look like first-party runtime work, not plugin work:
Happy to take one of those as a runtime PR rather than putting k3s inside |
|
A few data points from kiac (multi-node kubeadm and k3s on apple/container since June), limited to what this thread has not covered: IP rotation. +1 to sticky addressing (#1740) as the runtime fix. Until then kiac recovers on resume by rewriting every address-bearing file (admin/controller-manager/scheduler/kubelet kubeconfigs and the static pod manifests), re-issuing the apiserver serving cert with MetalLB on vmnet. Correction (see my reply below): re-tested on 1.3.1, host TCP to a floating VIP works; the drop described here did not reproduce and should be disregarded. One caveat on "gratuitous ARP works", from kubeadm clusters on container 1.0.0 in June: a floating VIP answered ARP but the host's TCP to it was dropped (node-to-node VIP traffic worked), so kiac used node IPs as the pool. That exposed a second problem: with one shared L2 pool and a cluster-wide L2Advertisement, a speaker on a non-owner node could win the ARP election for a live node IP and hijack that node's traffic, apiserver heartbeats included, taking it NotReady minutes after the first LoadBalancer Service (saiyam1814/kiac@2a65ec7 pins advertisements per node). kiac later replaced MetalLB with a small shell controller that assigns node IPs to Services, no speaker and no images. Different distro and an older release than your Talos run, so it may not apply there. One more landmine (container 1.0.0, kernel 6.12.28; not yet re-run on 1.3.1). A 1 MiB TCP upload from one apple/container VM to another stalls after 170-330 KB when the receiving VM forwards the stream across a veth into another network namespace (a NodePort, or any published port into a pod), only while the sender has TSO on. NAT is not the trigger: DNAT with local delivery is fine, plain forwarding into the veth stalls, and the macOS host sending through the identical DNAT+veth path moves 1 MiB in 7 ms. Receiver-side offload settings and an MSS clamp change nothing; the sender's TSO super-frames arrive as single 2.5-6 KB IP packets on a 1280-MTU interface and forwarding them into the 1500-byte veth fails with IpFragFails, which is what an skb without GSO metadata does (inferred from the counters, details in the issue). Sender
|
Uh oh!
There was an error while loading. Please reload this page.
Apple's
containerruns each container as its own micro-VM with its own vmnet IP. That's an unusual base for Kubernetes — one real VM per node, no shared kernel, no Docker socket. I wanted to know what it can actually host, so I built two small provisioners on it and ran them on hardware. Sharing what the substrate allows, and the landmines.k3ac) — external etcd quorum + haproxy HA: https://github.com/BinHsu/aegis-apple-container-provisioner-k3sBoth boot one micro-VM per node and form a real multi-node cluster with per-node IPs. They are proven spikes, not maintained tooling — the code is the receipts (each repo carries an ADR trail and a first-person hardware verification log). Credit where due: @saiyam1814's
kiacalready explored the kubeadm path; these are the Talos and k3s data points alongside it.Where the two diverge — HA, and it's the interesting part:
--cluster-initforms the cluster after boot, and embedded etcd's peer membership is IP-bound — cold-restart the VMs, vmnet hands out new DHCP IPs, the members look for peers at the old addresses, and quorum never reforms. So k3ac uses k3s's pluggable external datastore: a 3-node etcd quorum (mutual TLS) addressed by FQDN, fronted by an haproxy L4 load balancer. The cluster reconnects by name after any DHCP shift, and it adds day-2 ops (snapshot/restore, rolling upgrade/rollback, cert/token rotation), all behind a-forcedry-run gate.Substrate gotchas (all verified on hardware), shared by both lanes:
container cpfaults the vsock during k3s/Talos cold-boot image extraction → deliver the kubeconfig by host bind-mount instead.The Talos one I pitched upstream; it was declined on principled grounds (siderolabs/talos#13587), so it stays as a dev/CI substrate.
Write-ups — the DHCP traces, the ADRs, the maintainer's reasoning:
Curious whether a first-party Kubernetes story (discussion #1673) lands on k3s or something else.
All reactions