Configuring Kubernetes Pet Set with NFS

8/21/2016

I am trying to configure Pet Set in Kubernetes 1.3. There is a NFS storage backend that works as expected with Persistent Volumes, Claims, and Pods. However, when I create a Pet Set the VolumeClaimTemplate is never bound to the Persistent Volume backed by NFS.

Below is the definition of the PV -

apiVersion: v1
kind: PersistentVolume
metadata:
  name: janipv
spec:
  capacity:
    storage: 3Gi
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Recycle
  nfs:
    path: /var/data/test
    server: 172.17.4.101

When I try running the Pet Set sample available in the documentation, I see the following message.

kubelet describe pv

{persistentvolume-controller }          Warning         ProvisioningFailed      No provisioner plugin found for the claim!

The same configuration works fine when I use normal Pod instead of a Pet Set.

-- Janakiram MSV
kubernetes
stateful

1 Answer

8/22/2016

We don't have an NFS dynamic provisioner, like the error indicates: http://kubernetes.io/docs/user-guide/petset/#alpha-limitations (unless you wrote one, in which case we can start debugging). The volumeclaimtemplate itself never gets bound to anything. It's a template for the creation of volume claims, i.e the controller will create pvc-0, pvc-1... for pet-0,pet-1... those claims are bound to persistent volumes through a dynamic volume provisioner (as opposed to a static volume provisioning process where a human creates the pv and attaches it to the pvc).

You can hand attach an existing pv to one of the petset claims, just like you would for a replication controller's pods, by setting the volumeName field of the pvc.

-- Prashanth B
Source: StackOverflow