apiVersion: v1
kind: ReplicationController
metadata:
  name: nfs-server-slave
spec:
  replicas: 3
  selector:
    role: nfs-server-slave
  template:
    metadata:
      labels:
        role: nfs-server-slave
    spec:
      containers:
      - name: nfs-server-slave
        image: k8s.gcr.io/volume-nfs:0.8
        ports:
          - name: nfs
            containerPort: 2049
          - name: mountd
            containerPort: 20048
          - name: rpcbind
            containerPort: 111
        securityContext:
          privileged: true
        volumeMounts:
          - mountPath: /exports
            name: mypvc-slave
      volumes:
        - name: mypvc-slave
          persistentVolumeClaim:
            claimName: nfs