본문 바로가기

Cloud/Kubernetes

NFS를 볼륨으로 사용하는 Pod 만들기 (1)

apiVersion: v1
kind: Pod
metadata:
  name: busybox
  labels:
    app: busybox
spec:
  volumes:
  - name: nfs-hostpath
    hostPath:
      path: /nfs [실제 nfs가 mount 된 경로]
  containers:
  - image: busybox
    imagePullPolicy: IfNotPresent
    name: busybox
    volumeMounts:
    - mountPath: /var/www/html [Pod 경로]
      name: nfs-hostpath