- Create a Persistent Volume
deploy-history
which makes the storage available on each worker nodes at /tmp/deployment. Make sure it has the default provisioner of your cluster assigned. Label the Persistent Volume withaudit: true
,tier: middleware
. The persistent volume must have a capacity of 2 GB.
Hello bariman143,
try this
apiVersion: v1
kind: Pod
metadata:
name: pv-recycler
namespace: default
spec:
restartPolicy: Never
volumes:
- name: deploy-history
hostPath:
path: /any/path/it/will/be/replaced
containers:
- name: pv-recycler
image: "k8s.gcr.io/busybox"
volumeMounts:
- name: deploy-history
mountPath: /tmp/deployment
apiVersion: v1
kind: PersistentVolume
metadata:
name: deploy-history
labels:
audit: true
tier: middleware
spec:
capacity:
storage: 2Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
Thanks,
KodeKloud Support