kelseyhightower / kubernetes-the-hard-way

Bootstrap Kubernetes the hard way. No scripts.
Apache License 2.0
39.9k stars 13.7k forks source link

Storage does not work #705

Closed framctr closed 9 months ago

framctr commented 2 years ago

Hi, I successfully created the kubernetes cluster and I used it for a while. Now I'm trying to use some storage, but I'm facing some problems. I tried 2 ways:

  1. I used a storage class, but the PersistentVolumeClaim referring the StorageClass keeps Pending forever.
  2. I tried creating a PersistentDisk on GCE and attaching it in the Deployment.

In the second case, looking at the pod events I can see these:

Events:
  Type     Reason              Age   From                     Message
  ----     ------              ----  ----                     -------
  Normal   Scheduled           97s   default-scheduler        Successfully assigned default/nfs-server-65c4b59c54-h4z4d to worker-1
  Warning  FailedAttachVolume  47s   attachdetach-controller  AttachVolume.NewAttacher failed for volume "nfs-pvc" : failed to get GCE GCECloudProvider with error <nil>

What could it be? It seems to me that the cluster cannot create PersistentVolumes or refer to GCE Persistent disks...