Adding storage leads to stuck deployment on openshift pod

8/23/2018

I have been trying to add storage volumes on one of my pods. When I add the storage, it gets stuck deploying. I had set the strategy type to rolling but later changed it to recreate.

The error I get on events is;

No nodes are available that match all of the following predicates:: Insufficient pods (2), MatchNodeSelector (18), NoVolumeZoneConflict (26), PodToleratesNodeTaints (1).

I used to get this type of error when the nodes in the cluster got exhausted. This time, the pods run fine, but the moment I add the storage to the deployments, they get stuck.

Any idea where the problem is?

Some more info: The purpose I am adding storage is, that there are 3 folders in the pod I want to be able to read/write while the application is running. The names of the folders/volumes are like.

logs, tmp, uploadedDocuments

I created 3 PVCs, and used these storage for my 3 volumes. I tried pausing the rollouts, and then resume it later all at once but it didn't work either.

-- Ayush Ojha
kubernetes
openshift
openshift-client-tools
openshift-origin

1 Answer

8/30/2018

Well one probable reason can be the issues with the NFS mount (which PV uses) and the node where your pods are landing may be the the mount is not present or the permissions have some issues as the NFS mount for PV should have certain specification as per openshift https://docs.openshift.com/enterprise/3.1/install_config/persistent_storage/persistent_storage_nfs.html

-- Shubham Baghwala
Source: StackOverflow