apiVersion: extensions/v1beta1 kind: Deployment metadata: name: db spec: replicas: 1 template: metadata: labels: app: db spec: containers: - image: postgres:9.4 name: db volumeMounts: - mountPath: /var/lib/postgresql/data name: db-data volumes: - name: db-data emptyDir: {}