apiVersion: v1
kind: ReplicationController
metadata:
  name: nfs-bucket-server
spec:
  replicas: 1
  selector:
    role: nfs-bucket-server
  template:
    metadata:
      labels:
        role: nfs-bucket-server
    spec:
      containers:
      - name: nfs-bucket-server
        image: gcr.io/developer-269501/k8s-with-google-storage/nfs-bucket-server
        env:
        - name: BUCKET
          value: k8s-my-bucket
        ports:
          - name: nfs
            containerPort: 2049
          - name: mountd
            containerPort: 20048
          - name: rpcbind
            containerPort: 111
        volumeMounts:
          - name: k8s-iam-service
            mountPath: "/accounts"
            readOnly: true
        securityContext:
          privileged: true
      volumes:
        - name: k8s-iam-service
          secret:
            secretName: k8s-iam-service