apiVersion: v1
kind: Service
metadata:
name: demo
labels:
app: demo
spec:
# NOTE: depending on which version of the book you have, this may say port 9999. The latest version of the book uses 8888 to match the pod.
ports:
- port: 8888
protocol: TCP
targetPort: 8888
selector:
app: demo
type: ClusterIP
selector는 서비스에 라우팅할 파드를 알려준다
디플로이먼트는 애플리케이션의 파드의 세트를 관리하고
서비스는 요청을 파드에 전달하는 단일 엔트리 포인트를 제공