[K8S] emptyDir 볼륨 사용하는 Pod 생성
-
huaya
(후아빠) -
이 글의 작성자
- Offline
- Junior
-
덜보기
더보기
- Posts: 109
- Thank you received: 11
13 Dec 2022 08:07 #31980
작성자: huaya
huaya 님의 글: [K8S] emptyDir 볼륨 사용하는 Pod 생성
우선 일반적인 Pod 생성 커맨드를 사용하여 YAML을 만든다.
그리고 나서 spec 아래에 volumes, container 아래에 volumeMounts를 작성한다.
kubectl run redis-storage --image=redis:alpine --dry-run=client -o yaml
그리고 나서 spec 아래에 volumes, container 아래에 volumeMounts를 작성한다.
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: redis-storage
name: redis-storage
spec:
containers:
- image: redis:alpine
name: redis-storage
volumeMounts:
- mountPath: /data/redis
name: temp-volume
volumes:
- name: temp-volume
emptyDir: {}
Time to create page: 0.065 seconds