apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: k8s-ng-aspnetcore
  labels:
    istio-injection: enabled
    app: postgres
  name: postgres
spec:
  selector:
    matchLabels:
      app: postgres
  replicas: 1
  strategy: {}
  template:
    metadata:
      labels:
        istio-injection: enabled
        app: postgres
    spec:
      containers:
      - image: postgres:10.3-alpine
        env:
        - name: POSTGRES_DB
          value: somedb
        - name: PGDATA
          value: /var/lib/postgresql/data/pgdata
        - name: POSTGRES_PASSWORD
          value: postgres
        - name: POSTGRES_USERNAME
          value: postgres
        name: postgres
        ports:
        - containerPort: 5432
      restartPolicy: Always
status: {}