I am trying to connect an external nfs resource in a replication controller. When I create a replication controller, the module is pending. Having received information about the container, I get the following events:
Events: FirstSeen LastSeen Count From SubobjectPath Reason Message Thu, 05 Nov 2015 11:28:33 -0700 Thu, 05 Nov 2015 11:28:33 -0700 1 {scheduler } scheduled Successfully assigned web-worker-hthjq to jolt-server-5 Thu, 05 Nov 2015 11:28:43 -0700 Thu, 05 Nov 2015 11:28:43 -0700 1 {kubelet jolt-server-5} failedMount Unable to mount volumes for pod "web-worker-hthjq_default": exit status 32 Thu, 05 Nov 2015 11:28:43 -0700 Thu, 05 Nov 2015 11:28:43 -0700 1 {kubelet jolt-server-5} failedSync Error syncing pod, skipping: exit status 32
My setup is one master and one node on local machines. These machines run CoreOS. The nfs share exists on another machine on the network. If I overlay the shell on the host computer, I can successfully install the nfs share, so I believe that the export is configured correctly. Looking around the Internet, it seems that the only examples of using nfs shares are those defined in Kubernetes (one pod exchange with another). It is not possible to install external access directly from Kubernetes (I do not want to mount it on the host machine, and then mount it from the host machine into a container).
Here is my replication controller:
apiVersion: v1 kind: ReplicationController metadata: labels: name: web-worker name: web-worker spec: replicas: 1 selector: component: web-worker template: metadata: labels: app: task-queue component: web-worker spec: containers: - command: - /sbin/my_init image: quincy/php-apache2:latest name: web-worker ports: - containerPort: 80 protocol: TCP volumeMounts: - name: code-base mountPath: /var/www/html - name: local-secrets mountPath: /secrets volumes: - name: code-base nfs: server: thuey.jolt.local path: "/Users/thuey/Sites/jolt/jolt-web" - name: local-secrets secret: secretName: local-secret
UPDATE
After thinking about it more, I realized that the problem is that it cannot find the server (thuey.jolt.local). He probably just looks at the internal DNS. That's for sure? If so, is there any way around this?
UPDATE
After trying to restart it, it now works by mounting directly from the pod to the nfs network server.
thuey source share