You push your container, watch it spin up, and the minute you try to expose that service through a TCP proxy, nothing moves. Traffic vanishes into the ether. Every developer has lived this one. Microk8s TCP Proxies are supposed to fix exactly that—getting clean, reliable network access without the classic Kubernetes networking maze.
Think of Microk8s TCP Proxies as lightweight service doors. Instead of juggling Ingress controllers or hand-written NodePort mappings, they route plain TCP or UDP traffic directly to a Pod or Service. Because Microk8s runs as a single-node Kubernetes, simple proxying matters. It’s how you test real network paths before scaling out. Use proxies when you need to listen on low ports, support legacy protocols, or expose databases for internal automation. The TCP proxy layer isolates those flows and saves you from touching cluster-wide configs.
Here is the trick to making them work logically. Each proxy defines an external listening address and a target—usually a ClusterIP and port. Microk8s maintains iptables rules under the hood, mapping incoming packets to the right endpoint. Authentication and authorization flow through your Kubernetes RBAC, so namespaces still matter. Think about TCP proxies as programmable tunnels sitting atop your Pod network, fully aware of the identities managing them.
You can integrate this setup cleanly with identity systems like Okta or Keycloak using OIDC because, eventually, your proxy needs to know who opened the port. Wrap those connections with service accounts tied to Kubernetes secrets, rotate those secrets with automation tools like external-secrets, and keep your RBAC policies scoped to namespace-level resources. This keeps your audit logs neat, especially if you ever need your deployment to meet SOC 2 or ISO requirements.
Common hiccups? Misaligned ports and stalled health checks. Keep each proxy mapping consistent with your container manifest. Avoid overlapping proxy ranges when debugging multiple deployments. And always confirm the host firewall is not countering Kubernetes rules—Microk8s loves simplicity, but Linux firewalls do not.