Briefly explain ClusterIP, NodePort, and LoadBalancer service types in Kubernetes and when to use each.
- ClusterIP: internal-only service, default type
- NodePort: exposes service on each node port
- LoadBalancer: provisions external LB via cloud provider
- 💡Internal vs external exposure.
- ⚠️Over-exposing services: Using NodePort or LoadBalancer when a ClusterIP would suffice, leading to unnecessary external exposure and potential security vulnerabilities.
- ⚠️Misunderstanding NodePort's role: Relying solely on NodePort for production external access without an external load balancer, which lacks high availability and proper traffic distribution.
- ⚠️Cloud Provider Dependency for LoadBalancer: Assuming LoadBalancer works universally without a compatible cloud provider or an external load balancer controller (like MetalLB for bare-metal), leading to service creation failures.
- ⚠️Label Selector Mismatches: Incorrectly defining `selector` labels in the service definition, causing the service to not route traffic to any pods, making the application unreachable.
- ⚠️Cost and Resource Management with LoadBalancer: Overlooking the costs associated with cloud provider load balancers or hitting API rate limits and resource quotas, impacting scalability and budget.
- ❓What about Ingress vs Service?
- ❓When would you prefer ClusterIP + Ingress?
Ready to prove your AWS networking knowledge?
Practice with free Advanced Networking Specialty (ANS-C01) exam questions. Instant answers and detailed explanations — no account required.
Start free practice quizQuestions that share similar topics with this one
Deepen your knowledge with these related blog posts
EKS Cluster Upgrades: A Production Runbook for Platform Teams
A comprehensive guide to safely upgrading Amazon EKS clusters at scale. Covers pre-flight checks, control plane upgrades, add-on versioning, node group strategies, rollback procedures, common anti-patterns, and fleet automation.
From Terraform to GitOps: A Practical Migration Roadmap
A step-by-step guide to migrating from traditional Terraform workflows to GitOps, including migration patterns, common pitfalls, and practical diagrams to guide your journey.
GitOps: Monorepo vs Polyrepo - A Practical Comparison
A straightforward comparison of monorepo and polyrepo approaches for GitOps implementations. Understand the advantages, disadvantages, and when to use each strategy for your infrastructure and application deployments.