Skip to content

Argo Workflows Storage Quick Fix - Volume and PVC Configuration

DodaTech Updated 2026-06-26 1 min read

Argo Workflows storage configurations define volumes for data persistence across steps. Incorrect volume settings cause data loss or pod startup failures. This guide covers the fix.

Quick Fix

Wrong

- name: data-step
  container:
    image: alpine
    command: [sh]
  volumes:
  - name: data
    persistentVolumeClaim:
      claimName: my-pvc

The issue: volume declared at template level but not mounted in the container. The PVC exists but the container cannot access it.

- name: data-step
  container:
    image: alpine:latest
    command: ["/bin/sh", "-c"]
    args: ["echo 'data' > /mnt/data/output.txt"]
    volumeMounts:
    - name: data
      mountPath: /mnt/data
  volumes:
  - name: data
    persistentVolumeClaim:
      claimName: my-pvc
# Expected output after applying the fix
# PVC my-pvc mounted at /mnt/data in the container
# Data written to /mnt/data persists across steps
# Next step can access the same data
# Step completes successfully

Prevention

  • Always add volumeMounts to containers referencing declared volumes
  • Use ephemeral volumes for temporary data between steps in the same pod
  • Use volumeClaimTemplate for dynamic PVC creation per workflow
  • Set accessModes: ReadWriteMany for multi-step shared volumes
  • Clean up dynamically created PVCs with --keep flag

DodaTech Tools

Doda Browser's storage manager shows volume mounts and PVC status per workflow. DodaZIP archives storage configurations for capacity planning. Durga Antivirus Pro scans mounted volumes for malware.

FAQ

What is the difference between volumes and volumeClaimTemplate?

volumes reference existing PVCs. volumeClaimTemplate creates a new PVC per workflow run and deletes it after completion (unless configured to keep). ||| Can I share a volume across multiple workflow steps? Yes, use ReadWriteMany PVCs or ephemeral volumes within the same pod. For cross-pod sharing, use artifacts or external storage (S3, NFS). ||| How do I keep dynamically created PVCs after workflow completes? Set the --keep flag in argo submit or configure keepCompleted: 3 in volumeClaimTemplate to retain the specified number of PVCs.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro