Created
January 6, 2022 16:47
-
-
Save devendra-nationalwala/29c9ac16baca69a0fe5b2dc6cd7115b3 to your computer and use it in GitHub Desktop.
mongo-express.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: mongo-express | |
| labels: | |
| app: mongo-express | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: mongo-express | |
| template: | |
| metadata: | |
| labels: | |
| app: mongo-express | |
| spec: | |
| containers: | |
| - name: mongo-express | |
| image: mongo-express | |
| ports: | |
| - containerPort: 8081 | |
| env: | |
| - name: ME_CONFIG_MONGODB_ADMINUSERNAME | |
| valueFrom: | |
| secretKeyRef: | |
| name: mongodb-secret | |
| key: mongo-root-username | |
| - name: ME_CONFIG_MONGODB_ADMINPASSWORD | |
| valueFrom: | |
| secretKeyRef: | |
| name: mongodb-secret | |
| key: mongo-root-password | |
| - name: ME_CONFIG_MONGODB_SERVER | |
| valueFrom: | |
| configMapKeyRef: | |
| name: mongodb-configmap | |
| key: database_url | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: mongo-express-service | |
| spec: | |
| selector: | |
| app: mongo-express | |
| type: LoadBalancer | |
| ports: | |
| - protocol: TCP | |
| port: 8081 | |
| targetPort: 8081 | |
| nodePort: 30000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment