Skip to content

Instantly share code, notes, and snippets.

@jonathan-kosgei
Created February 22, 2017 20:43
Show Gist options
  • Save jonathan-kosgei/603df37a60b09a3e308bf498ae484511 to your computer and use it in GitHub Desktop.
Save jonathan-kosgei/603df37a60b09a3e308bf498ae484511 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: mongo
spec:
serviceName: mongo
template:
metadata:
labels:
name: mongo
name: mongo
spec:
terminationGracePeriodSeconds: 10
containers:
- name: mongo
image: localhost:5000/mongo
imagePullPolicy: Always
ports:
- containerPort: 27017
name: mongo
volumeMounts:
- name: mongo-data
mountPath: /srv/mongodb/
volumes:
- name: mongo-data
persistentVolumeClaim:
claimName: mongo-data-pvc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment