apiVersion: v1
kind: Pod
metadata:
  name: nginx-swarmtest-vol
  labels:
    app: myapp
spec:
  volumes:
    # Định nghĩa một volume - ánh xạ thư mục /home/www máy host
    - name: "frontendservice"
      hostPath:
          path: "../frontend-service"
  containers:
  - name: front-gateway
    image: nginx:1.17.6
    resources:
      limits:
        memory: "128Mi"
        cpu: "100m"
    ports:
      - containerPort: 80
    volumeMounts:
      - mountPath: /usr/share/nginx/html
        name: "frontendservice"
