Kubernetes部署容器挂载nfs共享目录实现持久化存储

apiVersion: v1
kind: Pod
metadata:
  name: test-nfs
  labels:
    app: AION
    project: test-nfs
spec:
  restartPolicy: Always
  containers:
  - name: nginx
    image: nginx
    imagePullPolicy: IfNotPresent
    volumeMounts:
    - name: data
      mountPath: /usr/share/nginx/html
  volumes:
  - name: data
    nfs:
      path: /nfs/openshare
      server: 192.168.199.73

 

你可能感兴趣的:(Kubernetes,docker,kubernetes,nginx,nfs)