44 lines
926 B
YAML
44 lines
926 B
YAML
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:latest
|
|
env:
|
|
- name: ME_CONFIG_MONGODB_SERVER
|
|
value: "mongo.mongodb.svc.cluster.local"
|
|
- name: ME_CONFIG_MONGODB_PORT
|
|
value: "27017"
|
|
- name: ME_CONFIG_BASICAUTH_USERNAME
|
|
value: "admin"
|
|
- name: ME_CONFIG_BASICAUTH_PASSWORD
|
|
value: "pass"
|
|
ports:
|
|
- containerPort: 8081
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: mongo-express
|
|
spec:
|
|
type: NodePort
|
|
ports:
|
|
- port: 8081
|
|
targetPort: 8081
|
|
nodePort: 30081
|
|
selector:
|
|
app: mongo-express
|