Hey Cloudees โ๏ธ!
If you’re working with Kubernetes, you’ve likely encountered “๐ถ๐๐ข๐ ๐ก๐๐๐ผ๐, ๐๐๐๐๐๐๐๐ก, ๐๐๐ ๐ฟ๐๐๐๐ต๐๐๐๐๐๐๐” services. But what are they, and when should you use each? ๐ค Letโs break it down!
1๏ธโฃ ๐๐ฅ๐ฎ๐ฌ๐ญ๐๐ซ๐๐:
๐พ๐๐๐ ๐๐ ๐ ๐๐๐: Exposes the service ๐ค๐๐กโ๐๐ ๐กโ๐ ๐๐๐ข๐ ๐ก๐๐. Pods communicate using an internal IP.
๐พ๐๐๐๐ญ๐๐๐: User request -> Service (clusterIP) -> Pods.
How Service identifies the pods?
Ans: Through pod “labels”
โ
๐ท๐๐๐:
โจ Simplifies internal networking.
โจSecure ๐: Not exposed externally.
โ๐ช๐๐๐:
โจ Not accessible from outside the cluster.
๐ธ๐ฅ๐๐๐๐๐: Your backend microservice connecting with a database service internally.
๐ต๐๐๐๐๐๐ ๐๐๐๐: Internal
๐บ๐๐๐๐๐๐๐๐๐๐: High โซ
๐ช๐๐๐: Low โฌ
๐ผ๐๐ ๐ช๐๐๐: Inter service communications within the cluster.
(Ideal for internal communication between microservices)
2๏ธโฃ ๐๐จ๐๐๐๐จ๐ซ๐ญ
๐พ๐๐๐ ๐๐ ๐ ๐๐๐: Opens a specific port on each ๐๐๐๐ in the cluster, forwarding traffic to the service.
๐พ๐๐๐๐ญ๐๐๐: User Request -> NodePort – > Service ( ClusterIP ) -> Pods
โ
๐ท๐๐๐:
โจ Easy to set up.
โจ External access without a load balancer.
โ๐ช๐๐๐:
โจ Ports are limited (30000-32767).
โจ Not suited for production; lacks flexibility and scalability.
๐ธ๐ฅ๐๐๐๐๐: Sharing a simple app demo accessible via :.
๐ต๐๐๐๐๐๐ ๐๐๐๐: External
๐บ๐๐๐๐๐๐๐๐๐๐: Low โฌ
๐ช๐๐๐: Low โฌ
๐ผ๐๐ ๐ช๐๐๐: Dev/test external access.
( For basic external access during development or testing)
3๏ธโฃ ๐๐จ๐๐๐๐๐ฅ๐๐ง๐๐๐ซ
๐พ๐๐๐ ๐๐ ๐ ๐๐๐: Provisions a ๐๐๐๐ข๐ ๐๐๐๐ฃ๐๐๐๐โ๐ ๐๐๐๐ ๐๐๐๐๐๐๐๐ to route external traffic.
๐พ๐๐๐๐ญ๐๐๐: User request -> LoadBalancer -> NodePort -> Service( clusterIP) -> Pods
โ
๐ท๐๐๐:
โจ Handles traffic distribution.
โจ Highly scalable and reliable.
โ๐ช๐๐๐:
โจ Tied to cloud providers (AWS, GCP, Azure).
โจ Can incur extra costs.
๐ธ๐ฅ๐๐๐๐๐: Hosting your e-commerce application for global customers.
๐ต๐๐๐๐๐๐ ๐๐๐๐: External
๐บ๐๐๐๐๐๐๐๐๐๐: High โซ
๐ช๐๐๐: High โซ
๐ผ๐๐ ๐ช๐๐๐: Production apps requiring reliability.
(For production-level external access with scaling and reliability)
๐ ๐๐ซ๐จ ๐๐ข๐ฉ: For advanced traffic control, consider combining these with Ingress controllers or switching to modern solutions like Service Mesh!
What service type do you use most often? Share your experiences below! โฌ๏ธ
Our Next topic “๐๐ง๐ ๐ซ๐๐ฌ๐ฌ” layer4 & Layer7.
Do like, comment,repost and share and support me for more simple DevOps related topics โค๏ธ.
devops #cicd #dev #k8s #kubernetes #docker