datawire / kubernaut

Instant ephemeral Kubernetes clusters for development and testing
Apache License 2.0
117 stars 8 forks source link

Persistent storage doesn't work #6

Open richarddli opened 7 years ago

richarddli commented 7 years ago

I tried to deploy a mongoDB. kubectl describe pod mongodb says:

` FirstSeen LastSeen Count From SubObjectPath Type Reason Message


5m 29s 22 {default-scheduler } Warning FailedScheduling PersistentVolumeClaim is not bound: "todo-db-persistent-storage-todo-db-0"`

plombardi89 commented 7 years ago

Adding some additional context I received (internally found issue):

kubectl describe pod todo-db-0
Name:        todo-db-0
Namespace:    default
Node:        /
Labels:        controller-revision-hash=todo-db-437957389
        environment=test
        role=todo-db
Status:        Pending
IP:
Controllers:    StatefulSet/todo-db
Containers:
  mongo:
    Image:    mongo
    Port:    27017/TCP
    Command:
      mongod
      --replSet
      rs0
      --smallfiles
      --noprealloc
    Volume Mounts:
      /data/db from todo-db-persistent-storage (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-mszg6 (ro)
    Environment Variables:    <none>
  mongo-sidecar:
    Image:    cvallance/mongo-k8s-sidecar
    Port:
    Volume Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-mszg6 (ro)
    Environment Variables:
      MONGO_SIDECAR_POD_LABELS:    role=todo-db,environment=test
Conditions:
  Type        Status
  PodScheduled     False
Volumes:
  todo-db-persistent-storage:
    Type:    PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:    todo-db-persistent-storage-todo-db-0
    ReadOnly:    false
  default-token-mszg6:
    Type:    Secret (a volume populated by a Secret)
    SecretName:    default-token-mszg6
QoS Class:    BestEffort
Tolerations:    <none>
Events:
  FirstSeen    LastSeen    Count    From            SubObjectPath    Type        Reason            Message
  ---------    --------    -----    ----            -------------    --------    ------            -------
  21s        6s        6    {default-scheduler }            Warning        FailedScheduling    PersistentVolumeClaim is not bound: “todo-db-persistent-storage-todo-db-0”
plombardi89 commented 7 years ago

Reproduction steps:

  1. Clone out TODO
  2. Forge deploy
plombardi89 commented 7 years ago

This looks like a case where there is no default storage class for the instance. We should probably install one.