Lab 8.3 pvc-one stuck in "Pending" status
Hi!
I'm working through Lab 8.3 at the moment and somehow I can't create a PVC that works as expected.
I successfully created the PersistentVolume. The output of kubectl get pv pvvol-1 -o yaml looks like this:
apiVersion: v1
kind: PersistentVolume
metadata:
creationTimestamp: "2023-04-29T11:14:54Z"
finalizers:
- kubernetes.io/pv-protection
name: pvvol-1
resourceVersion: "14977"
uid: b5efe537-6f46-4eb5-8d03-f03f79c161d9
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 1Gi
nfs:
path: /opt/sfw
server: hammerhead
persistentVolumeReclaimPolicy: Retain
volumeMode: Filesystem
status:
phase: Available
But the PersistentVolumeClaim never leaved the status "Pending". The output of kubectl get pvc pvc-one -o yaml looks like this:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: "2023-04-29T11:15:00Z"
finalizers:
- kubernetes.io/pvc-protection
name: pvc-one
namespace: default
resourceVersion: "14980"
uid: 1e9a5f78-ac59-423d-85a5-49983b24b2a8
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 200Mi
storageClassName: local-path
volumeMode: Filesystem
status:
phase: Pending
I have to say, I run a single node k3s cluster at the moment, but I don't think that should matter here. All steps up to step 3 worked just fine.
Any ideas, what I might be wrong? Any hint on how do debug my problem?
Best regards,
Andreas
Comments
-
Ok, I found a solution to my problem. I had to add
storageClassName: ""in the pvc.yaml file. Now it looks like this:apiVersion: v1 kind: PersistentVolumeClaim metadata: name: pvc-one spec: storageClassName: "" <-- added accessModes: - ReadWriteMany resources: requests: storage: 200MiI came up with that after reading about Persistent Volumes on the kubernetes website. Apparently this has to do with whether or not the admission plugin in the cluster is turned on or not.
Maybe this helps anyone with a similar problem.
1 -
Thanks! this post helped me
0 -
Thank you. Solved my issue!
0 -
Adding hostname "cp" to the hosts file of the node helped.
1
Categories
- All Categories
- 177 LFX Mentorship
- 177 LFX Mentorship: Linux Kernel
- 769 Linux Foundation IT Professional Programs
- 379 Cloud Engineer IT Professional Program
- 175 Advanced Cloud Engineer IT Professional Program
- 75 DevOps IT Professional Program - Discontinued
- 7 DevOps & GitOps IT Professional Program
- 102 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- 5 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 14 Cloud & Containers Training
- 1 Cybersecurity Training
- 2 DevOps & Site-Reliability Training
- 1 Linux Kernel Development Training
- 1 Networking Training
- 2 Open Source Best Practice Training
- 3 System Administration Training
- 1 System Engineering Training
- 2 Web & Application Development Training
- 796 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 91 Storage
- 771 Linux Distributions
- 81 Debian
- 68 Fedora
- 23 Linux Mint
- 13 Mageia
- 24 openSUSE
- 151 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 124 Mobile Computing
- 20 Android
- 89 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 396 Off Topic
- 121 Introductions
- 31 Study Material
- 1K Programming and Development
- 310 Kernel Development
- 703 Software Development
- 1K Software
- 406 Applications
- 182 Command Line
- 5 Compiling/Installing
- 70 Games
- 318 Installation
- Archived
- 183 Small Talk
- 2 LFD140 Class Forum
- 1.4K LFS258 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)
