K8s storage: emptyDir
(Redirected from EmptyDir:)
Jump to navigation
Jump to search
Official example[edit]
apiVersion: v1
kind: Pod
metadata:
name: test-pd
spec:
containers:
- image: registry.k8s.io/test-webserver
name: test-container
volumeMounts:
- mountPath: /cache
name: cache-volume
volumes:
- name: cache-volume
emptyDir:
sizeLimit: 500Mi
medium: Memory
/tmp example[edit]
apiVersion: v1
kind: Pod
metadata:
name: test-pod
spec:
containers:
- image: registry.k8s.io/test-webserver
name: test-container
securityContext:
readOnlyRootFilesystem: true
volumeMounts:
- mountPath: /tmp
name: tmp-volume
volumes:
- name: tmp-volume
emptyDir:
sizeLimit: 1G
Additional examples[edit]
extraVolumes: - name: extras emptyDir: {} extraVolumeMounts: - name: extras mountPath: /usr/share/extras readOnly: true
kubectl get psp Warning: policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+ NAME PRIV CAPS SELINUX RUNASUSER FSGROUP SUPGROUP READONLYROOTFS VOLUMES gce.gke-metrics-agent false RunAsAny RunAsAny RunAsAny RunAsAny false hostPath,secret,configMap grafana false RunAsAny RunAsAny RunAsAny RunAsAny false configMap,emptyDir,projected,secret,downwardAPI,persistentVolumeClaim
kubectl get psp Warning: policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+ NAME PRIV CAPS SELINUX RUNASUSER FSGROUP SUPGROUP READONLYROOTFS VOLUMES gce.gke-metrics-agent false RunAsAny RunAsAny RunAsAny RunAsAny false hostPath,secret,configMap
Related[edit]
See also[edit]
emptyDir,readOnlyRootFilesystem- Kubernetes volumes:
volumeMounts:,mountPath, snapshots,spec.volumes, projected volumes, PVC - Kubernetes storage, storage classes, PersistentVolume (PV), PVC, CSI,
kind: StorageClass, kind: PersistentVolumeClaim, kind: PersistentVolume,kubectl [ get | describe | edit ] pvc,volumeClaimTemplates:,kubectl patch pv,FailedMount, Volume Expansion, Volume Cloning, snapshots, ExtraVolumes, NotTriggerScaleUp,volumePVCDataSource, AllowVolumeExpansion, EKS storage, provisioner, Storage Capacity Tracking,VolumeBinding, VolumeClaimTemplate, storage.k8s.io, CKA Storage, DoKC,emptyDir, Volume populators,storageclass.kubernetes.io, Rook, Longhorn, projected volumes
Advertising: