Kubernetes Networking: Services, Ingress, and Network Policies
Understand Kubernetes networking: ClusterIP, NodePort, LoadBalancer, Ingress, and policy.
On this page
Kubernetes networking can be confusing. Here’s a concise guide to services, ingress, and network policy.
Services
- ClusterIP: Internal cluster DNS; default for in-cluster traffic.
- NodePort: Expose a port on every node; good for dev or legacy.
- LoadBalancer: Cloud LB per service; use when you need a dedicated external IP.
Ingress
- Ingress = HTTP(S) routing (host/path) to backend services. You need an Ingress controller (e.g. nginx, AWS ALB).
- TLS: Terminate at ingress; use cert-manager for certificates.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myapp
spec:
ingressClassName: nginx
rules:
- host: myapp.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: myapp
port: { number: 80 }
Network Policies
- NetworkPolicy restricts pod-to-pod and pod-to-external traffic. Default-deny and allow only what’s needed.
- Start with a policy that allows DNS and ingress; then add app-specific rules.
Best practice: document your ingress and network policy approach so every new service follows the same pattern.
Cite this article
Kiril Urbonas (2026). Kubernetes Networking: Services, Ingress, and Network Policies. DevOpsNess. https://www.devopsness.com/blog/kubernetes-networking-services-ingress-and-network-policies
[Kubernetes Networking: Services, Ingress, and Network Policies](https://www.devopsness.com/blog/kubernetes-networking-services-ingress-and-network-policies) (Kiril Urbonas, DevOpsNess, 2026-02-13)
More from DevOps
Explore more articles in this category
kaniko CVE-2026-105769: Lookalike ACR Hosts Get Your Azure Token. Rebuild on v1.25.20
A FROM line pointing at a host like x.azurecr.io.attacker.com is enough to make kaniko hand the build's Entra ID token to that host. Which kaniko forks and images are affected, how to find Azure identities in your build pods, and what to rotate.
Sign Container Images With Cosign: Keyless GitHub Actions Workflow, SBOM and In-Cluster Checks
One workflow that builds, signs keylessly with GitHub OIDC, attaches an SBOM and SLSA provenance, plus the Kyverno policy that refuses anything unsigned. Copy it, change three names, ship it.
GitLab CVE-2026-110264: A Second CVSS 10 RCE in Nine Days. Patch to 19.5.1
An unauthenticated regex-compiler RCE reaching back to GitLab 7.0, no workaround, and backports on older branches that fix only the critical bug. The exact version per branch and the commands to get there.
You might have missed
Evergreen posts worth revisiting.