-
Notifications
You must be signed in to change notification settings - Fork 567
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an example that uses a generic ephemeral volume
Longhorn 8198 Signed-off-by: Eric Weber <eric.weber@suse.com> (cherry picked from commit c557f1d)
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: volume-test | ||
namespace: default | ||
spec: | ||
restartPolicy: Always | ||
containers: | ||
- name: volume-test | ||
image: nginx:stable-alpine | ||
imagePullPolicy: IfNotPresent | ||
livenessProbe: | ||
exec: | ||
command: | ||
- ls | ||
- /data/lost+found | ||
initialDelaySeconds: 5 | ||
periodSeconds: 5 | ||
volumeMounts: | ||
- name: volv | ||
mountPath: /data | ||
ports: | ||
- containerPort: 80 | ||
volumes: | ||
- name: volv | ||
ephemeral: | ||
volumeClaimTemplate: | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: longhorn | ||
resources: | ||
requests: | ||
storage: 2Gi |