You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.1 KiB
YAML
55 lines
1.1 KiB
YAML
|
3 months ago
|
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: db_host
|
||
|
|
---
|
||
|
|
apiVersion: v1
|
||
|
|
kind: Service
|
||
|
|
metadata:
|
||
|
|
name: mongo-express-service
|
||
|
|
spec:
|
||
|
|
selector:
|
||
|
|
app: mongo-express
|
||
|
|
type: LoadBalancer
|
||
|
|
#type: ClusterIP
|
||
|
|
ports:
|
||
|
|
- protocol: TCP
|
||
|
|
port: 8081
|
||
|
|
targetPort: 8081
|
||
|
|
nodePort: 30000
|
||
|
|
#nodePort: 30000
|
||
|
|
|