---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mongodb-deployment
spec:
  replicas: 1                  # Number of pods
  selector:                    #
    matchLabels:               # This selector MUST MATCH below labels
      app: mongodb-label          #

  # Pod template
  template:
    metadata:
      name: mongodb-pod           
      labels:
        app: mongodb-label
    spec:
      containers:                       
        - name: db                     
          image: mongo
          imagePullPolicy: Always
          ports:
            - containerPort: 27017   # Phải khai báo pod này có dùng port 27017
