github.com/qsunny/k8s@v0.0.0-20220101153623-e6dca256d5bf/examples-master/staging/volumes/nfs/nfs-web-rc.yaml (about)

     1  # This pod mounts the nfs volume claim into /usr/share/nginx/html and
     2  # serves a simple web page.
     3  
     4  apiVersion: v1
     5  kind: ReplicationController
     6  metadata:
     7    name: nfs-web
     8  spec:
     9    replicas: 2
    10    selector:
    11      role: web-frontend
    12    template:
    13      metadata:
    14        labels:
    15          role: web-frontend
    16      spec:
    17        containers:
    18        - name: web
    19          image: nginx
    20          ports:
    21            - name: web
    22              containerPort: 80
    23          volumeMounts:
    24              # name must match the volume name below
    25              - name: nfs
    26                mountPath: "/usr/share/nginx/html"
    27        volumes:
    28        - name: nfs
    29          persistentVolumeClaim:
    30            claimName: nfs