You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 28 Next »


목차

Service Type

NodePort

  • NodePort를 통해 외부네트워크에서 접속가능한 서비스타입

ClusterIP (default)

  • 외부에서접속이 불가하며 Cluster내부에서만 접근 가능한 서비스타입

LoadBalancer

  • 3Party LoadBalancer의 도움을 받아 외부에서 접속 가능한 서비스타입


ClusterIP (default)



nginx-deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deploy
  labels:
    app: myapp-deploy
    type: front-end
spec:
  template:
    metadata:
      name: nginx
      labels:
        app: myapp
        type: front-end
    spec:
      containers:
        - name: nginx
          image: nginx:1.14.2
          ports:
            - containerPort: 80
  selector:
    matchLabels:
      type: front-end
  replicas: 3
apiVersion: v1
kind: Service
metadata:
  labels:
	app: myapp-svc
    type: front-end
  name: nginx-svc
spec:
  ports:
  - port: 80
    protocol: TCP
    targetPort: 80
  selector:
    type: front-end



NodePort


Single Pod on Single Node

Multi Pod on Single Node

Multi Pod on Multi Node

LoadBalancer



  • No labels