notes blog about

Pods’ IP addresses are dynamic and can change over time.

Service is an abstraction with fixed virtual IP address (ClusterIP) fronting a set of pods matching a common label.

Service provides discoverable names and loadbalancing.

Service type defines how the matching Pods are exposed.

A service does not need a deployment but they can work in tandem. A Deployment manages Pods and their replication. A Service routes network requests to a set of Pods.


Create deployment + service:

kubectl create deployment echoserver --port=8080 --replicas=5
kubectl expose deployment echoserver --port=80 --target-port=8080