Red Hat Training
A Red Hat training course is available for OpenShift Container Platform
27.4. Pod のボリュームとしての要求
PersistentVolumeClaim は Pod によってボリュームとして使用されます。OpenShift Container Platform は Pod と同じ namespace の指定された名前で要求を検索し、この要求を使用してこれに対応するマウントするボリュームを検索します。
要求を含む Pod の定義
apiVersion: "v1"
kind: "Pod"
metadata:
name: "mypod"
labels:
name: "frontendhttp"
spec:
containers:
-
name: "myfrontend"
image: openshift/hello-openshift
ports:
-
containerPort: 80
name: "http-server"
volumeMounts:
-
mountPath: "/var/www/html"
name: "pvol"
volumes:
-
name: "pvol"
persistentVolumeClaim:
claimName: "claim1"