apiVersion: v1
kind: ReplicationController
metadata:
  name: postgres
  labels:
    app: postgres
spec:
  replicas: 1
  selector:
    app: postgres
  template:
    metadata:
      labels:
        app: postgres
    spec:
      containers:
      - name: postgres
        image: postgres:latest
        env:
        - name: POSTGRES_PASSWORD
          value: password
        ports:
        - name: postgres-port
          containerPort: 5432