Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kubernetes PersistentVolumeClaim is not bound

I have a Kubernetes up and running on AWS working correctly.

I'm trying to deploy this sample application. I can run the project locally with docker-compose up without any issue

I used https://github.com/kubernetes-incubator/kompose to deploy it on Kubernetes. It worked but when I checked the pods I have the following error:

[SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "web-claim0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "web-claim0", which is unexpected., SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "web-claim0", which is unexpected.]

I would like to share a volume between the 2 containers without setting up aws-ebs. Is it possible? I'd like to start with the simplest volume share as possible.

here is the volume configuration


Persistent Volume Claim     {5}

kind    :   PersistentVolumeClaim

apiVersion  :   v1

    metadata        {6}

name    :   web-claim1

namespace   :   default

selfLink    :   /api/v1/namespaces/default/persistentvolumeclaims/web-claim1

uid :   a94c38da-de18-11e6-84b6-027fd28089d4

resourceVersion :   296178

creationTimestamp   :   2017-01-19T07:26:58Z

    spec        {2}

    accessModes     [1]

0   :   ReadWriteOnce

    resources       {1}

    requests        {1}

storage :   100Mi

    status      {1}

phase   :   Pending
like image 998
samidarko Avatar asked Nov 09 '22 03:11

samidarko


1 Answers

I think I was quite confused by how it works so it was difficult for anybody to answer. I'm just going to give a couple of hints.

  1. Don't learn Kompose and just learn Kubernetes
  2. The root cause of the problem was I didn't created the volumes on EBS first
like image 168
samidarko Avatar answered Nov 15 '22 10:11

samidarko