SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. kind: StorageClass
  2. apiVersion: storage.k8s.io/v1beta1
  3. metadata:
  4.   name: px-postgres-sc
  5. provisioner: kubernetes.io/portworx-volume
  6. parameters:
  7.   repl: "3"
  8.   io_profile: "db"
  9.   priority_io: "high"
  10. ---
  11. kind: PersistentVolumeClaim
  12. apiVersion: v1
  13. metadata:
  14.   name: postgres-data
  15.   annotations:
  16.     volume.beta.kubernetes.io/storage-class: px-postgres-sc
  17. spec:
  18.   accessModes:
  19.     - ReadWriteOnce
  20.   resources:
  21.     requests:
  22.       storage: 2Gi
  23. ---
  24. apiVersion: extensions/v1beta1
  25. kind: Deployment
  26. metadata:
  27.   name: postgres
  28. spec:
  29.   strategy:
  30.     rollingUpdate:
  31.       maxSurge: 1
  32.       maxUnavailable: 1
  33.     type: RollingUpdate
  34.   replicas: 1
  35.   template:
  36.     metadata:
  37.       labels:
  38.         app: postgres
  39.     spec:
  40.       schedulerName: stork
  41.       containers:
  42.       - name: postgres
  43.         image: postgres:9.5
  44.         imagePullPolicy: "IfNotPresent"
  45.         ports:
  46.         - containerPort: 5432
  47.         env:
  48.         - name: POSTGRES_USER
  49.           value: pgbench
  50.         - name: PGUSER
  51.           value: pgbench
  52.         - name: POSTGRES_PASSWORD
  53.           value: superpostgres
  54.         - name: PGBENCH_PASSWORD
  55.           value: superpostgres
  56.         - name: PGDATA
  57.           value: /var/lib/postgresql/data/pgdata
  58.         volumeMounts:
  59.         - mountPath: /var/lib/postgresql/data
  60.           name: postgres-data
  61.       volumes:
  62.       - name: postgres-data
  63.         persistentVolumeClaim:
  64.           claimName: postgres-data
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top