A walkthrough of how Mcaster1StackSmith deploys identically as a systemd service on bare metal and as a single Kubernetes pod inside the cluster it manages. Helm chart anatomy, the emptyDir socket trick, and why the Helm chart is four manifests instead of fourteen.
Live repository
What the article will cover
The two-shape thesis
Same source, same binary, different config — running as systemd on bare metal AND as a K8s pod simultaneously across the fleet.
Pod anatomy
C++ daemon container + PHP-FPM container sharing a Unix socket via emptyDir. No init container, no sidecar.
Helm chart, four manifests
Deployment, Service, ConfigMap, Secret. Optional HPA. What each one does and why nothing else is needed.
TLS without ingress-nginx
The daemon terminates TLS itself, so cert-manager hands certs to a ConfigMap-mounted volume — no ingress controller required for in-cluster mTLS.
Health probes
Liveness, readiness, and startup probes are HTTP endpoints on the daemon. Zero sidecar code.
Operating both modes
How the same monitoring stack covers systemd journald + kubectl logs, and why the operational mental model collapses into one.