Phase 8 — Cloudflare Tunnel and the Ingress Controller I Didn't Need
What This Post Is
Section titled “What This Post Is”Seven phases in, the Humor Memory Game had a working K3s cluster, full observability, and a GitOps pipeline pushing every change through ArgoCD. What it didn’t have was a way for anyone outside the house to actually see it. Phase 8 closes that gap with a Cloudflare Tunnel — and turns into the phase I learned the most from being wrong.
Seven phases in, my Humor Memory Game had a working K3s cluster, full observability, and a GitOps pipeline pushing every change through ArgoCD. What it didn’t have was a way for anyone outside my house to actually see it.
Phase 8 closes that gap: a single Cloudflare Tunnel now exposes the app itself, plus the shared tooling I’d already built — ArgoCD, Grafana, Prometheus — to the public internet, with no inbound ports opened on my home network at all.
It also turned into the phase where I learned the most from being wrong.
The starting assumption that didn’t survive contact with reality
Section titled “The starting assumption that didn’t survive contact with reality”Every tutorial on this topic assumes the same shape: run cloudflared on a laptop or a VM, point it at localhost, done. I started there too, and it took about three wrong turns to realize the entire premise was off for a Kubernetes homelab.
If cloudflared runs outside the cluster, it’s fighting the exact problem I built the cluster to avoid — chasing unstable IPs, restarting the tunnel by hand when a service moves. The actual fix was running it in the cluster, as a Deployment, talking to internal Service DNS names that don’t change. Obvious in hindsight; not obvious from the tutorials, all of which predate treating Kubernetes as the default.
The ingress controller I didn’t need
Section titled “The ingress controller I didn’t need”I went in assuming I’d need to stand up ingress-nginx in front of everything. Turned out I’d never actually deployed one — a kubectl get svc -n ingress-nginx came back empty. And digging into why led to a bigger discovery: ingress-nginx, the de facto standard for years, reached end-of-life this March. No more patches, ever.
Since cloudflared running in-cluster can reach any Service directly, I didn’t need an ingress layer at all for this — not a workaround, just genuinely unnecessary. Gateway API is the community’s answer to the ingress-nginx situation, and it’s now a logged, deliberate decision to pick that up in a future phase rather than bolt on a controller I’d need to immediately replace.
Secrets, done properly this time
Section titled “Secrets, done properly this time”The tunnel credential is a real secret — the kind that shouldn’t sit in Git as plaintext. Sealed Secrets solved this cleanly: encrypt the credential with a cluster-specific public key, commit the ciphertext, let the in-cluster controller decrypt it on apply. ArgoCD manages the encrypted form exactly like every other manifest, and the plaintext never touches version control.
I did consider Terraform for the tunnel and DNS records too, since “everything in code” has been the rule for this whole project. For four DNS records and one tunnel, though, the tooling overhead didn’t pay for itself — a versioned bootstrap script gets most of the traceability benefit for a fraction of the complexity. Logged as a deferred decision, not a skipped one.
The bug that outlasted three wrong diagnoses
Section titled “The bug that outlasted three wrong diagnoses”The most stubborn issue had nothing to do with Cloudflare. Getting the argocd CLI to authenticate kept failing with a network-level connection reset, on both a Service-based and a pod-direct port-forward, on a freshly recreated pod. Three plausible-sounding theories — CNI namespace staleness, a TLS/plaintext mismatch, an unhealthy pod — all turned out wrong.
The actual fix skipped the network path entirely: argocd login --core authenticates straight through existing kubectl credentials. No port-forward, no port to fight over, no CNI layer to go stale. Sometimes the right fix isn’t debugging the broken path harder — it’s not needing that path at all.
What’s actually running now
Section titled “What’s actually running now”Two cloudflared replicas (failover, not load-balanced — worth knowing, since it’s not obvious from the name), routing four hostnames to internal Services with zero ingress controller in between, credentials encrypted at rest in Git, the whole thing deployed and kept in sync by ArgoCD like everything else in this project.
One thing I’m not calling done yet: Prometheus’s hostname is live with no authentication in front of it at all. Grafana and ArgoCD at least have their own logins; Prometheus doesn’t ship with one. A Cloudflare Access policy in front of it is the obvious next move, and it’s staying on the list rather than getting glossed over.
Next up
Section titled “Next up”Phase 9 turns from exposing this cluster to the internet, to giving it a cloud provider to talk to — without an AWS account or a bill. The Osomudeya repo’s Terraform provisions a real production shape (EKS, RDS, VPC networking) against provider "aws", and LocalStack emulates that API surface closely enough to run it unmodified, locally, for free.
Gateway API stays logged for a later phase — ingress-nginx’s end-of-life isn’t going anywhere, but it’s not blocking anything today, so it can wait its turn.
Repo: humor-memory-game-kubernetes — see infra/cloudflared/ for the manifests and the full deployment guide.