--- apiVersion: apps/v1 kind: Deployment metadata: name: bullish-database spec: selector: matchLabels: app: bullish-database replicas: 1 strategy: type: RollingUpdate rollingUpdate: maxUnavailable: 0 maxSurge: 1 template: metadata: labels: app: bullish-database spec: volumes: - name: postgres-data hostPath: path: "/var/k8s-pv/bullish/postgres" type: DirectoryOrCreate containers: - name: postgres image: postgres:13.1-alpine envFrom: - secretRef: name: bullish-secret volumeMounts: - name: postgres-data mountPath: /var/lib/postgresql/data/pgdata --- apiVersion: v1 kind: Service metadata: name: bullish-database labels: app: bullish-database spec: type: ClusterIP selector: app: bullish-database ports: - port: 5432 targetPort: 5432 protocol: TCP ...