Skip to content

Instantly share code, notes, and snippets.

@nottrobin
Created May 17, 2018 12:28
Show Gist options
  • Select an option

  • Save nottrobin/29a3108a721925b55dfbba3d0071c59b to your computer and use it in GitHub Desktop.

Select an option

Save nottrobin/29a3108a721925b55dfbba3d0071c59b to your computer and use it in GitHub Desktop.
Basic postgres kubernetes configuration
# A basic service running an *ephemeral* postgres instance
# This can then be used in applications by pointing at "postgres://postgres@postgres/postgres"
kind: Service
apiVersion: v1
metadata:
name: postgres
spec:
selector:
app: postgres
ports:
- protocol: TCP
port: 5432
targetPort: 5432
---
kind: Deployment
apiVersion: apps/v1beta1
metadata:
name: postgres
spec:
replicas: 1
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: postgres
image: postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment