Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

배포할 환경 미리보기

Info

Image Added


Kubernetes 배포 파일 작성

  • Code Block
    themeMidnight
    titlek8s-deploy.yml
    linenumberstrue
    ---
      apiVersion: apps/v1
      kind: Deployment
      metadata:
        name: redis
      spec:
        selector:
          matchLabels:
            app: redis
        replicas: 1
        template:
          metadata:
            labels:
              app: redis
          spec:
            containers:
            - name: redis
              image: redis
              ports:
              - containerPort: 6379
    ---
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: webflux-demo
    spec:
      selector:
        matchLabels:
          app: webflux-demo
      replicas: 3
      template:
        metadata:
          labels:
            app: webflux-demo
        spec:
          containers:
          - name: reactor-demo
            image: sooabia/webflux-demo:1.0
            ports:
            - containerPort: 8080
    --- 
    kind: Service
    apiVersion: v1
    metadata:
      name: spring-service
    spec:
      selector:
        app: webflux-demo
      ports:
      - protocol: TCP
        port: 80
        targetPort: 8080
      type: LoadBalancer
    --- 
    kind: Service
    apiVersion: v1
    metadata:
      name: redis
    spec:
      selector:
        app: redis
      ports:
      - protocol: TCP
        port: 6379
        targetPort: 6379
      type: ClusterIP

...