apiVersion: apps/v1
kind: Deployment
metadata:
  name: mongo-express
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mongo-express
  template:
    metadata:
      labels:
        app: mongo-express
    spec:
      containers:
        - name: mongo-express
          image: mongo-express
          env:
            - name: ME_CONFIG_MONGODB_URL
              value: "mongodb://root:Mongodb01@192.168.2.109:30981"
          ports:
            - containerPort: 8081
---
apiVersion: v1
kind: Service
metadata:
  name: mongo-express
spec:
  type: NodePort
  ports:
    - port: 8081
      targetPort: 8081
      nodePort: 30801
  selector:
    app: mongo-express
