Switch language한국어
Back to the list

Services in Kubernetes

TL;DR AI

Key summary

2 min read
  1. Pods are ephemeral: they come and go and their IPs change frequently.

  2. A Service provides a stable IP and DNS and automatically load-balances traffic.

  3. Services use selectors (e.g., selector: app: minha-api) to route traffic to any Pod with that label; they don't reference ReplicaSets or Deployments.

  4. A Service load-balances traffic across all matching Pods (e.g., Pods A, B, C).

  5. Configure port (Service port) vs targetPort (container port) and use named ports; prefer ClusterIP by default, use LoadBalancer only to expose externally, keep labels consistent and check endpoints.

Read the original