Kubefeeds Team A dedicated and highly skilled team at Kubefeeds, driven by a passion for Kubernetes and Cloud-Native technologies, delivering innovative solutions with expertise and enthusiasm.

๐ŸŒ ๐”๐ง๐๐ž๐ซ๐ฌ๐ญ๐š๐ง๐๐ข๐ง๐  ๐Š๐ฎ๐›๐ž๐ซ๐ง๐ž๐ญ๐ž๐ฌ ๐’๐ž๐ซ๐ฏ๐ข๐œ๐ž๐ฌ: ๐‚๐ฅ๐ฎ๐ฌ๐ญ๐ž๐ซ๐ˆ๐, ๐๐จ๐๐ž๐๐จ๐ซ๐ญ, ๐š๐ง๐ ๐‹๐จ๐š๐๐๐š๐ฅ๐š๐ง๐œ๐ž๐ซ ๐Ÿš€

59 sec read

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

Image description
Image description
Image description

Kubefeeds Team A dedicated and highly skilled team at Kubefeeds, driven by a passion for Kubernetes and Cloud-Native technologies, delivering innovative solutions with expertise and enthusiasm.