k8s-deployment.yml 1.23 KB
Newer Older
David Mendez's avatar
David Mendez committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
apiVersion: apps/v1 
kind: Deployment
metadata:
  name: lina-web
  labels:
    app: lina-web
spec:
  selector:
    matchLabels:
      app: lina-web
      role: master
      tier: frontend
  replicas: 2
  template:
    metadata:
      labels:
        app: lina-web
        role: master
        tier: frontend
    spec:
      containers:
      - name: lina-web
David Mendez's avatar
David Mendez committed
23
        image: <SERVER_IMAGE_TAG>
David Mendez's avatar
David Mendez committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
        imagePullPolicy: Always
        ports:
        - containerPort: 3000
        volumeMounts:
          - name: run-config
            mountPath: '/etc/run_config/'
            readOnly: true
        env:
          - name: HTTP_PROXY
            value: "<HTTP_PROXY>"
          - name: http_proxy
            value: "<HTTP_PROXY>"
          - name: HTTPS_PROXY
            value: "<HTTPS_PROXY>"
          - name: https_proxy
            value: "<HTTPS_PROXY>"
          - name: NO_PROXY
            value: "<NO_PROXY>"
          - name: no_proxy
            value: "<NO_PROXY>"
      volumes:
        - name: run-config
          secret:
            secretName: <ENV_SECRET_NAME>

---
apiVersion: v1
kind: Service
metadata:
David Mendez's avatar
David Mendez committed
53
  name: lina-web
David Mendez's avatar
David Mendez committed
54 55
spec:
  selector:
David Mendez's avatar
David Mendez committed
56
    app: lina-web
David Mendez's avatar
David Mendez committed
57 58 59 60 61
  ports:
  - protocol: TCP
    port: 3000
    targetPort: 3000
  type: NodePort