Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

135
Vistas
Why cant I mount the same PVC twice with different subpaths to single pod?

Why cant I have a setup like below. I want to map vol1 to a pod with different subpath has xyz and vol2 to the same pod with subpath abc.

  volumes:
  - name:vol1
    persistentVolumeClaim:
      claimName: testclaim
  - name: vol2
    persistentVolumeClaim:
      claimName: testclaim

containers volume mounts:

  volumeMounts:
    - name: vol1
      mountPath: /test/
      subPath: abc
    - name: vol2
      mountPath: /test2/
      subPath: xyz

What is the alternative for this kind of setup?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Try this

  volumeMounts:
    - name: vol1
      mountPath: /test
      subPath: abc
    - name: vol1
      mountPath: /test2
      subPath: xyz
volumes:
- name: vol1
  persistentVolumeClaim:
    claimName: testclaim
over 4 years ago · Santiago Trujillo Denunciar

0

you can use same PVC in different pods who are in same node. but you can't claim same pvc with different volumes in same pod. and here you don't need to add the pvc in your volumes multiple time . you can just add pvc single time. and mount the volume in different mountPath.

this will be the updated yaml format

volumes:
- name: vol1
  persistentVolumeClaim:
    claimName: testclaim
  volumeMounts:
    - name: vol1
      mountPath: /test
      subPath: abc
    - name: vol1
      mountPath: /test2
      subPath: xyz
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda