Skip to content

Instantly share code, notes, and snippets.

@goindwalia
Created March 15, 2017 07:21
Show Gist options
  • Save goindwalia/64a7e5ce82558e3b52e8c361a1813206 to your computer and use it in GitHub Desktop.
Save goindwalia/64a7e5ce82558e3b52e8c361a1813206 to your computer and use it in GitHub Desktop.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: postgres
namespace: production
spec:
replicas: 1
template:
metadata:
labels:
k8s-app: postgres
spec:
containers:
- name: postgres
image: dr.xenonstack.com:5050/postgres:v9.6
imagePullPolicy: "IfNotPresent"
ports:
- containerPort: 5432
env:
- name: POSTGRES_USER
value: postgres
- name: POSTGRES_PASSWORD
value: superpostgres
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgredb
volumes:
- name: postgredb
glusterfs:
endpoints: glusterfs-cluster
path: postgres-disk
readOnly: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment