apiVersion: apps/v1
kind: Deployment
metadata:
  name: k8s-hello-genserver
spec:
  selector:
    matchLabels:
      app: k8s-hello-genserver
  replicas: 3
  template:
    metadata:
      labels:
        app: k8s-hello-genserver
    spec:
      containers:
      - name: k8s-hello-genserver
        image: sreenadhtc/hello-genserver:0.1
        imagePullPolicy: "IfNotPresent"
        ports:
          - containerPort: 4000
        env:
          # - name: MIX_ENV
          #   value: "prod"
          - name: POD_IP
            valueFrom:
              fieldRef:
                fieldPath: status.podIP
          - name: POD_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          - name: POD_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
        args: ["elixir", "--name", "$(POD_NAME)@$(POD_IP)","--cookie","hellogenserver","-S", "mix", "phx.server"]