apiVersion: apps/v1
kind: Deployment
metadata:
  name: testapp
  labels:
    name: testapp
spec:
  replicas: 2
  selector:
    matchLabels:
      name: testapp
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        name: testapp
    spec:
      containers:
        - image: nginx:alpine
          name: nginx
          resources:
            requests:
              cpu: "20m"
              memory: "55M"
          ports:
            - containerPort: 5000

        - image: ubuntu:alpine
          name: ubuntu
          resources:
            requests:
              cpu: "20m"
              memory: "55M"
          ports:
            - containerPort: 6000
          command:
            - sleep
            - "3600"

      restartPolicy: Always
      #imagePullPolicy: Always
