pires / kubernetes-vagrant-coreos-cluster

Kubernetes cluster (for testing purposes) made easy with Vagrant and CoreOS.
Apache License 2.0
597 stars 205 forks source link

Persistant Volumes are not created #272

Open patvdleer opened 6 years ago

patvdleer commented 6 years ago

I'm not sure this is related to this specific project but it look like the persistent volumes aren't created dynamically. I've added the following StorageClasses but once I deploy a pod with a persistent volume claim the volume isn't created.

USE_KUBE_UI=true MASTER_CPUS=1 NODE_MEM=4096 MASTER_MEM=2048 NODE_CPUS=1 NODES=5 vagrant up
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
  name: standard
  annotations:
    storageclass.beta.kubernetes.io/is-default-class: "true"
  labels:
    kubernetes.io/cluster-service: "true"
    addonmanager.kubernetes.io/mode: "EnsureExists"
provisioner: kubernetes.io/gce-pd
parameters:
  type: pd-standard
---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: slow
  annotations:
    storageclass.beta.kubernetes.io/is-default-class: "false"
provisioner: kubernetes.io/gce-pd
parameters:
  type: pd-standard
  fsType: ext4
---
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
  name: fast
  annotations:
    storageclass.beta.kubernetes.io/is-default-class: "false"
provisioner: kubernetes.io/gce-pd
parameters:
  type: pd-ssd
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: local-postgres
  namespace: local
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 5Gi
pires commented 6 years ago
provisioner: kubernetes.io/gce-pd

Did you use this repo to provision a cluster on top of GCP?

patvdleer commented 6 years ago

No in vagrant locally, I completely overlooked the provisioner line, what should that be for a local env?

pires commented 6 years ago

Whatever the provisioner you want to use defines.

patvdleer commented 6 years ago

I don't see why the PV's aren't created dynamically based on the PVC's...

pires commented 6 years ago

The provisioner you chose is not available.

patvdleer commented 6 years ago

Maybe a stupid question but is there a way to see which ones are available or how can I install these, duckduckgo/google doesn't seem to be of any help

pires commented 6 years ago

Here's a list of known provisioners.

For local disk volumes, it's tricky - there's alpha support coming in Kubernetes 1.9. Perhaps, you'll be able to get the NFS provisioner to work.