Skip to content

Instantly share code, notes, and snippets.

@g1soori
Last active August 9, 2020 08:13
Show Gist options
  • Save g1soori/b5a2361d981e8f85e4fc3f9a8807d23e to your computer and use it in GitHub Desktop.
Save g1soori/b5a2361d981e8f85e4fc3f9a8807d23e to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: mongo
name: mongo
namespace: hyg
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: mongo
template:
metadata:
creationTimestamp: null
labels:
app: mongo
spec:
containers:
- image: mongo
name: mongo
ports:
- containerPort: 27017
env:
- name: MONGO_INITDB_ROOT_USERNAME
valueFrom:
configMapKeyRef:
name: mongo-config
key: mongoadmin
- name: MONGO_INITDB_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: mongo-secret
key: mongpswd
volumeMounts:
- name: mongo-data
mountPath: /data/db
resources: {}
volumes:
- name: mongo-data
persistentVolumeClaim:
claimName: managed-premium-mongo
status: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment