- How do Pods find each other inside the cluster? (service discovery)
- How does external traffic reach your applications? (Ingress / Gateway)
- How do you control which pods can talk to which other pods? (network security)
- The four Kubernetes Service types and when to use each
- How Services provide stable endpoints and load balancing for ephemeral pods
- When to use Ingress vs Gateway API for external traffic
- How NetworkPolicy implements pod-level firewalls (default-deny patterns)
- How CoreDNS enables service discovery via DNS



- Load balancing — How does a frontend distribute traffic across multiple, dynamically changing backend replicas?
- Service discovery — How does a frontend find backend replicas that may appear after the frontend is deployed?
- External access — How do Internet users reach applications when pods have private, non-routable IPs?

- Client pod calls a Service by DNS name (e.g.,
api-service). - CoreDNS resolves that name to the Service’s ClusterIP (for example
10.96.50.100). - The Service holds a label selector to discover backend pods and maintains an endpoints list.
- A node-level proxy (kube-proxy or CNI equivalent) load-balances traffic sent to the ClusterIP across healthy pods.


app.example.com arrives at the Ingress controller; /api routes to api-svc and /web routes to web-svc. Common controllers include ingress-nginx, Contour (Envoy), and Traefik.

- Better protocol support (HTTP, TCP, UDP, gRPC)
- Extensibility and richer traffic features (splitting, mirroring, header-based routing)
- Clear role separation between infrastructure, platform, and app teams
- GatewayClass — chosen by infrastructure providers to define load balancer types (similar to StorageClass).
- Gateway — created by platform operators to instantiate LBs and listeners.
- Routes (HTTPRoute, TCPRoute, UDPRoute, etc.) — defined by application teams to express routing.

Gateway API supports advanced traffic features not available in Ingress: traffic splitting (canaries), request mirroring, header-based routing, and native TCP/UDP routing. Prefer Gateway API for new platform designs when supported by your controller.

- Namespace-scoped: policies in namespace A do not affect namespace B.
- Additive model: if any policy allows a connection, it is allowed. There is no explicit deny object — you deny by omission.
- Requires a CNI implementation that supports NetworkPolicy; otherwise policies are ignored.

NetworkPolicy rules are only enforced if your CNI plugin implements them. Test policies in a non-production environment first — otherwise policies may have no effect and pods will remain fully open.
- Short name (same namespace):
api-service - Namespace-qualified (cross-namespace):
api-service.payments - Fully qualified domain name (FQDN):
api-service.payments.svc.cluster.local

- Use Services (ClusterIP) to abstract pod IPs and enable stable DNS names and virtual IPs. Never hard-code Pod IPs.
- Prefer Gateway API for new platforms (role separation, protocol flexibility, advanced traffic controls). Ingress remains widely used and supported.
- Enforce least-privilege networking with NetworkPolicy: adopt a default-deny posture and add explicit allow rules. Confirm CNI support before enforcing policies.
- Use DNS names for service discovery: short names within a namespace, namespace-qualified names for cross-namespace calls, and FQDN for full clarity.

- Kubernetes Services: https://kubernetes.io/docs/concepts/services-networking/service/
- Ingress: https://kubernetes.io/docs/concepts/services-networking/ingress/
- Gateway API: https://gateway-api.sigs.k8s.io/
- NetworkPolicy: https://kubernetes.io/docs/concepts/services-networking/network-policies/
- CoreDNS: https://coredns.io/