Menu

Post image 1
Post image 2
1 / 2
0

Kubernetes Services — How Your App Finally Talks to the World

DEV Community·Linta Paul·21 days ago
#XfPGprqP
Reading 0:00
15s threshold

The Problem — Your App is Invisible You deployed your app in Kubernetes. Pods are running. But open a browser — nothing loads. Why? Pods are isolated by default. They have internal IPs that the outside world cannot reach. And those IPs change every time a Pod restarts. What a Kubernetes Service Does A Service gives your app a stable, permanent endpoint — a fixed IP and port that stays the same no matter what happens to your Pods. It does three things: Exposes a stable IP and port Groups the right Pods using selectors (labels) Automatically reroutes traffic if a Pod crashes The 3 Types of Services Type Who Can Access Use Case ClusterIP Inside cluster only Microservices NodePort Same network Local testing LoadBalancer The internet Production A Real Service YAML apiVersion : v1 kind : Service metadata : name : my-web-service spec : type : LoadBalancer selector : app : my-web-app # finds pods with this label ports : - port : 80 targetPort : 8080 Enter fullscreen mode Exit fullscreen mode The Key Insight Services…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More