apiVersion: apps/v1
kind: Deployment
metadata:
    name: server-deployment
spec:
    replicas: 3
    selector:
        matchLabels:
            component: server
    template:
        metadata:
            labels:
                component: server
        spec:
            containers:
                -   name: server
                    image: raunakjodhawat/multi-server
                    ports:
                        -   containerPort: 5000
                    env:
                        -   name: REDIS_HOST
                            value: redis-cluster-ip-service
                        -   name: REDIS_PORT
                            value: "6379"
                        -   name: PGUSER
                            value: postgres
                        -   name: PGHOST
                            value: postgres-cluster-ip-service
                        -   name: PGPORT
                            value: "5432"
                        -   name: PGDATABASE
                            value: postgres
                        -   name: PGPASS
                            valueFrom: 
                                secretKeyRef: 
                                    name: pgpassword
                                    key: PGPASSWORD