apiVersion: apps/v1
kind: Deployment
metadata:
  name: hello-nfs
spec:
  replicas: 3
  selector:
    matchLabels:
      app: hello-nfs
  template:
    metadata:
      labels:
        app: hello-nfs
    spec:
      containers:
        - name: hello-nfs
          image: busybox
          imagePullPolicy: IfNotPresent
          command: ["sh", "-c"]
          args: ['echo "The host is $(hostname)" >> /dir/data; sleep 3600']
          volumeMounts:
            - name: nfs-vol
              mountPath: /dir
      volumes:
        - name: nfs-vol
          nfs:
            path: /volume1/shared/k8s
            server: 192.168.1.6
