Moving the Vehicle Stack Without Moving Its Failure Boundaries
A container restart cannot preserve a vehicle function whose deadline has already expired. Moving from statically supervised Linux services to K3s therefore starts with separating functions that must continue operating from services that may recover asynchronously. The migration budget should buy demonstrable fault containment, with deployment speed treated as a separate return.
Move the dependency boundary first
Start with a dependency trace of the existing stack, including shared memory, device access, startup ordering and persistent state, because packaging a daemon preserves its hidden coupling. Move a diagnostic collection service first, retain the existing control path, and replace synchronous calls into that service with bounded queues whose overflow policy explicitly permits diagnostic loss. For a candidate supervisory function, an illustrative acceptance requirement might be a 100 ms maximum response time during diagnostic memory exhaustion, measured at the function boundary rather than inferred from pod health. Shadow execution adds integration work and consumes processor capacity, so justify it through measured output divergence and the reduction in unresolved interface dependencies before transferring ownership. Prevent the shadow instance from commanding actuators, and make the ownership transition explicit. Where automotive functional safety standards such as ISO 26262 apply, charge interface redesign and renewed interference analysis against the measurable scope of affected safety evidence, because retaining old binaries does not preserve old architectural assumptions.
Contain exhaustion before scheduling recovery
A diagnostic process that allocates without bound is the useful migration test: it should lose its own service before it takes memory from the execution path the vehicle depends on. In the unified cgroup hierarchy, memory.high applies reclaim pressure and throttling, while memory.max provides a hard containment boundary that can invoke the local out of memory killer when reclaim cannot satisfy allocations, as described in the Linux memory controller documentation. Verify the effective hierarchy on the production image and reserve capacity for the kernel, runtime and supervision services, charging that unused application capacity against measured response latency and diagnostic throughput under injection. Kubernetes resource requests influence placement, while pod priority and CPU quotas do not establish real-time execution guarantees, and node pressure eviction is not a substitute for timely memory containment. Mixed-criticality placement therefore needs admission restrictions backed by an execution boundary justified through interference analysis, with dedicated processors or hardware isolation funded only where their capacity and hardware costs buy a measured reduction in interference. Replicating the diagnostic service on the same host adds memory demand without removing the shared kernel dependency, so compare useful service availability under the injected fault before approving replica overhead.
Keep continuity outside reconciliation
Because K3s separates server control services from agent execution, fund additional control plane infrastructure only when its measured improvement in orchestration recovery justifies its processor, storage and validation costs, while keeping the vehicle function’s continuity independent of scheduler decisions, remote image retrieval and diagnostic recovery.
Pay for rollback that includes state
The painful part arrives when a containerized release changes persistent data: switching the boot bank back does not undo a schema conversion on a shared writable partition. Make dual-bank A/B deployment cover a compatible platform image and workload manifest, retain the required container images locally, and delay boot acceptance until application checks and the memory exhaustion test have passed in the release qualification process. Additional flash capacity buys a locally available previous release, so defend that bill through measured rollback completion time and the proportion of recovery trials completed without downloading artifacts. Persistent state needs a reversible migration, a compatible reader or a validated snapshot, and the associated engineering and storage costs must be compared with measured restoration time and the amount of recent state that recovery would discard. Maintaining the legacy and containerized paths also duplicates integration testing, so retire the legacy path only after fault injection demonstrates that the required function stays within its response bound and rollback restores usable state. If those conditions cannot be demonstrated on the intended hardware, keep the function outside the orchestrated domain and budget the retained interface explicitly, because removing that interface would otherwise purchase consolidation by surrendering an unproven amount of fault containment.