pod-volume.yml 527 B

123456789101112131415161718192021222324
  1. apiVersion: v1
  2. kind: Pod
  3. metadata:
  4. name: pod-volume
  5. spec:
  6. containers:
  7. - name: tomcat
  8. image: tomcat
  9. imagePullPolicy: IfNotPresent
  10. ports:
  11. - containerPort: 8080
  12. volumeMounts:
  13. - mountPath: /usr/local/tomcat/logs
  14. name: logs
  15. - name: busybox
  16. image: busybox
  17. imagePullPolicy: IfNotPresent
  18. command: ["sh", "-c", "tail -f /logs/catalina*.log"]
  19. volumeMounts:
  20. - mountPath: /logs
  21. name: logs
  22. volumes:
  23. - name: logs
  24. emptyDir: {}