Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App with persistent volume fail #159

Open
jp-gouin opened this issue Dec 11, 2024 · 1 comment
Open

App with persistent volume fail #159

jp-gouin opened this issue Dec 11, 2024 · 1 comment
Labels
priority/0 high priority virtual-kubelet all virtual kubelet related issues

Comments

@jp-gouin
Copy link
Collaborator

I created the following sample app:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: sample-pv
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  hostPath:
    path: /mnt/data
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: sample-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: sample-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sample-app
  template:
    metadata:
      labels:
        app: sample-app
    spec:
      containers:
      - name: sample-app
        image: ubuntu:latest
        command: ["/bin/sh", "-c", "df -h /data && tail -f /dev/null"]
        volumeMounts:
        - name: data-volume
          mountPath: /data
      volumes:
      - name: data-volume
        persistentVolumeClaim:
          claimName: sample-pvc

The volume claim is created as well as the volume :

> k --kubeconfig config.yaml get pvc
NAME                 STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
sample-pvc           Bound     pvc-e8183aa2-61c7-421d-9595-ccbde46382c2   1Gi        RWO            local-path     40s
> k --kubeconfig config.yaml get pv 
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM                STORAGECLASS   REASON   AGE
pvc-e8183aa2-61c7-421d-9595-ccbde46382c2   1Gi        RWO            Delete           Bound       default/sample-pvc   local-path              36s

The pod however fails with :

...
status:
  conditions:
  - lastProbeTime: null
    lastTransitionTime: "2024-12-11T14:53:47Z"
    message: '0/4 nodes are available: persistentvolumeclaim "sample-pvc" not found.
      preemption: 0/4 nodes are available: 4 Preemption is not helpful for scheduling.'
    reason: Unschedulable
    status: "False"
    type: PodScheduled
  phase: Pending
  qosClass: BestEffort
@galal-hussein
Copy link
Collaborator

thats expected since pvs/pvcs feature is still in progress #141

@jp-gouin jp-gouin added virtual-kubelet all virtual kubelet related issues priority/0 high priority labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/0 high priority virtual-kubelet all virtual kubelet related issues
Projects
None yet
Development

No branches or pull requests

2 participants