mongo-express.yaml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: mongo-express
  5. labels:
  6. app: mongo-express
  7. namespace: overleaf
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. app: mongo-express
  13. template:
  14. metadata:
  15. labels:
  16. app: mongo-express
  17. spec:
  18. containers:
  19. - name: mongo-express
  20. image: mongo-express
  21. ports:
  22. - containerPort: 8081
  23. env:
  24. - name: ME_CONFIG_MONGODB_ADMINUSERNAME
  25. valueFrom:
  26. secretKeyRef:
  27. name: mongodb-secret
  28. key: mongo-root-username
  29. - name: ME_CONFIG_MONGODB_ADMINPASSWORD
  30. valueFrom:
  31. secretKeyRef:
  32. name: mongodb-secret
  33. key: mongo-root-password
  34. - name: ME_CONFIG_MONGODB_SERVER
  35. valueFrom:
  36. configMapKeyRef:
  37. name: mongodb-configmap
  38. key: database_url
  39. ---
  40. apiVersion: v1
  41. kind: Service
  42. metadata:
  43. name: mongo-express-service
  44. namespace: overleaf
  45. spec:
  46. selector:
  47. app: mongo-express
  48. type: NodePort
  49. ports:
  50. - protocol: TCP
  51. port: 8081
  52. targetPort: 8081
  53. nodePort: 30000