Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix problem with pod's issue "pod has unbound immediate persistentvolumeclaims" in Kubernetes

I want setup a working environment on local machine where I had installed microk8s before. And when I install Jenkins from helm chart (stable/jenkins) I have problem

pod has unbound immediate PersistentVolumeClaims

I started cluster in Linux Ubuntu 18.x which installed and working in Oracle Virtual box. Please give me any tips.

Persistent volume started without any problems. I tried to change size of PV but that didn't help with problem. In pod's log there is only one sentence about that pod is initializing. Searching of similar problem gave me nothing.

Pod's log content:

container "jazzed-anteater-jenkins" in pod "jazzed-anteater-jenkins-69886499b4-6gbhn" is waiting to start: PodInitializing

like image 504
Bogdan Pisarenko Avatar asked Jan 12 '19 07:01

Bogdan Pisarenko


People also ask

Why is PVC pending in state?

Normally the PVCs get created and bound to the cluster quickly, however, in some cases the PVCs fail to bind to the cluster, which results in them getting stuck in the Pending state, this prevents the Platform UI deployment from completing.

What is persistent volume and persistent volume claim?

PVs are volume plugins like Volumes, but have a lifecycle independent of any individual Pod that uses the PV. This API object captures the details of the implementation of the storage, be that NFS, iSCSI, or a cloud-provider-specific storage system. A PersistentVolumeClaim (PVC) is a request for storage by a user.


1 Answers

In my case problem was related with droped IPtables FORWARD policy. I had investigated it with the help of microk8s.inspect command.

InitContainer couldn't get access to the Internet and it stopped deployment of whole pod with main container. Solving was easy

sudo iptables -P FORWARD ACCEPT 

and redeployment with Helm.

like image 108
Bogdan Pisarenko Avatar answered Oct 11 '22 14:10

Bogdan Pisarenko