apiVersion: apps/v1
kind: Deployment
metadata:
  name: k8-sample-flask-celery
  labels:
    app: k8-sample-flask-celery
spec:
  selector:
    matchLabels:
      app: k8-sample-flask-celery
  strategy:
    type: Recreate
  replicas: 3
  template:
    metadata:
      labels:
        app: k8-sample-flask-celery
    spec:
      containers:
      - name: k8-sample-flask-celery-container
        # Replace  with your project ID or use `make template`
        image: sunil96/corona_web:v1
        command: ['python','views.py']
        # This setting makes nodes pull the docker image every time before
        # starting the pod. This is useful when debugging, but should be turned
        # off in production.
        imagePullPolicy: Always
        ports:
        - containerPort: 5000
        env:
        - name: BROKER_URL
          value: amqp://admin:admin@rabbit:5672
        - name: RESULT_BACKEND_URL
          value: redis://redis-master:6379/1
