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.
Multi-Cloud Infrastructure: Managing Resources Across Providers
We run mostly on AWS but use GCP for specific workloads. The honest cost-benefit analysis of multi-cloud, plus the patterns that make it not awful.
AI Best Practices for Engineering Teams: From Prompt Experiments to Platform Discipline
A practical field manual for engineering teams who want AI features that survive real users, incidents, and budgets — not just demo day.
More from DevOps
Explore more articles in this category
GitHub Copilot CLI Sandboxing Is GA: What Actually Changed
GitHub made local sandboxing generally available for Copilot CLI on October 7, so the default now restricts the agent instead of trusting it.
The Tensorlake npm Compromise Targeted Your AI Tool Configs
A compromised npm release went after cloud credentials as expected, and local AI coding-assistant config files, which most teams never treated as secrets.
GitLab's New Rate Limits: What to Fix Before Oct 19
GitLab is capping unauthenticated API calls at 60 an hour starting October 19, and the preview windows land before most teams will have noticed.
You might have missed
Evergreen posts worth revisiting.