1. Service 란?


2. Service 생성

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80
kubectl get pod -o wide
# Pod 의 IP 를 확인합니다.

curl -X GET <POD-IP> -vvv
ping <POD-IP>
# 통신 불가능
minikube ssh
# minikube 내부로 접속합니다.

curl -X GET <POD-IP> -vvv
ping <POD-IP>
# 통신 가능