apiVersion: apps/v1                            # defines the API version we use
kind: Deployment                               # type of config object
metadata:
  name: poi     
  namespace: api           # use a descriptive name
spec:
  selector:
    matchLabels:
      app: poi                   # this deployment will only 'look after' pods with this label
  replicas: 2                                  # tells deployment to run 2 pods matching the template
  template:                                    # create pods using pod definition in this template
    metadata:
      labels:
        app: poi                     # selector of deployment must match the label the pod. label are key-value pairs.
    spec:
      containers:                              # definition of the containers in the spec
      - image: registrybnk1575.azurecr.io/tripinsights/poi:1.0   # name of docker image you want to use
        name: poi
        env:
        - name: SQL_USER
          value: sqladminbNk1575
        - name: SQL_PASSWORD
          value: nP1px5Qj3
        - name: SQL_SERVER
          value: sqlserverbnk1575.database.windows.net
        - name: SQL_DBNAME
          value: mydrivingDB
        imagePullPolicy: Always
                        # the port exposed with the container, replace with relevant port  
     