Deploy Jekyll App on Kubernetes - PersistentVolumeClaims

Hi guys,

I’ve been working on this task for a few days already and still stuck at the same place. This is the error I’m getting. Any idea what could be the issue?

 Type     Reason            Age                From               Message
  ----     ------            ----               ----               -------
  Warning  FailedScheduling  34s (x3 over 36s)  default-scheduler  0/2 nodes are available: 2 pod has unbound immediate PersistentVolumeClaims.
thor@jump_host ~$ kubectl get pv
NAME                     CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM   STORAGECLASS   REASON   AGE
jekyll-site-datacenter   1Gi        RWX            Retain           Available                                   4m20s
thor@jump_host ~$ 

My definition file

---
apiVersion: v1
kind: Namespace
metadata:
    name: jekyll-namespace-datacenter
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: jekyll-site-datacenter
  namespace: jekyll-namespace-datacenter
spec:
  storageClassName: manual
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
---
apiVersion: v1
kind: Pod
metadata:
  name: jekyll-pod-datacenter
  namespace: jekyll-namespace-datacenter 
  labels:
    app: myjekyll
spec:
  volumes:
  - name: site
    persistentVolumeClaim:
        claimName: jekyll-site-datacenter 

  initContainers:
  - name: jekyll-init-datacenter 
    image: kodekloud/jekyll
    imagePullPolicy: IfNotPresent
    command: [ "jekyll", "new", "/site" ] 
    volumeMounts:
      - name: site
        mountPath: /site

  containers:
  - name: jekyll-container-datacenter
    image: kodekloud/jekyll-serve
    volumeMounts:
      - name: site
        mountPath: /site
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: myjekyll
  name: jekyll-container-datacenter
  namespace: jekyll-namespace-datacenter
spec:
  selector:
    app: myjekyll
  type: NodePort
  ports:
  - port: 8080
    targetPort: 4000
    nodePort: 31181
status:
  loadBalancer: {}

Hello, @jtapia05
Where is your PV definition yaml file? Can you please share it?
Share the output of kubectl get pv,pvc.

Change
storageClassName: csi-hostpath-sc
in your pvc yaml and try out

Thanks @ramalrg and @player001 for your reply. I had an issue with the storageClassName