apiVersion: apps/v1
kind: Deployment
metadata:
    name: expiration-depl
spec:
    replicas: 1
    selector:
        matchLabels:
            app: expiration
    template:
        metadata:
            labels:
                app: expiration
        spec:
            containers:
                - name : expiration
                  image: rampooco/expiration
                  env :
                    - name: NATS_CLIENT_ID
                      valueFrom:
                        fieldRef:
                            fieldPath: metadata.name
                    - name: NATS_URL
                      value : 'http://nats-clusterip-service:4222'
                    - name: NATS_CLUSTER_ID
                      value : 'ticketing'
                    - name: REDIS_HOST
                      value : 'expiration-redis-clusterip'
                   