InterviewStack.io LogoInterviewStack.io

Kubernetes Networking and Services Questions

Covers the Kubernetes networking model and how services are exposed, discovered, secured and managed within and outside a cluster. Candidates should understand the flat networking model where each pod receives an Internet Protocol address, container network interface plugins and kube proxy forwarding modes. They should know service types including ClusterIP, NodePort, LoadBalancer and ExternalName, the concept of headless services, and service endpoint resolution. Explain Domain Name System based service discovery, CoreDNS roles, ingress controllers and ingress resources for external routing, and load balancer behavior and health checks. Include network policy concepts for controlling pod ingress and egress and service mesh fundamentals such as Istio and Linkerd for advanced routing, observability and mutual Transport Layer Security. Cover service management and operational practices including readiness and liveness probes, session affinity, external traffic policy, scaling strategies and annotations for cloud load balancers. Describe debugging and troubleshooting techniques such as verifying service endpoints, checking Domain Name System resolution, inspecting network policies, capturing packet traces and reviewing metrics, logs and distributed traces. Discuss design trade offs for multi cluster and cross namespace communication, security segmentation, performance and cost implications of different service exposure methods.

MediumTechnical
90 practiced
When and how should you use sessionAffinity on a Kubernetes Service? Explain kube-proxy's implementation of clientIP affinity, its configuration (timeout seconds), and implications for load balancing, scaling, and sticky-session behavior with Ingress/LoadBalancer frontends.
MediumTechnical
68 practiced
Explain externalTrafficPolicy for a Service of type LoadBalancer or NodePort. Compare the behavior of externalTrafficPolicy: Cluster vs Local in terms of client IP preservation, source IPs seen by pods, and health-check interactions with cloud load balancers.
HardSystem Design
73 practiced
Design a zero-downtime blue-green deployment strategy for a stateful service running on Kubernetes that requires leader election. Explain how you would manage service discovery, headless services, DNS caching, leader election handoff, and data migration to ensure no split-brain and minimal client impact.
HardSystem Design
92 practiced
Design a multi-cluster service discovery and routing strategy between an on-premises cluster and a cloud cluster that must expose a microservice across both for regional failover. Discuss DNS federation, service mesh federation, latency, security, and failover requirements and trade-offs.
EasyTechnical
78 practiced
What is kube-proxy, what are its forwarding modes (userspace, iptables, ipvs), and how do these modes differ in how they perform service load balancing and packet handling? Explain operational impacts (performance, debugging) of switching modes in a production cluster.

Unlock Full Question Bank

Get access to hundreds of Kubernetes Networking and Services interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.