Create a Pod called redis-storage
with image: redis:alpine
with a Volume of type emptyDir
that lasts for the life of the Pod.
Specs on the below.
*template*
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: {}
---
apiVersion: v1
kind: Pod
metadata:
name: redis-storage
spec:
containers:
- image: redis:alpine
name: redis-storage
volumeMounts:
- mountPath: /data/redis
name: cache-volume
volumes:
- name: cache-volume
emptyDir: {}