OpenShift Storage, Persistent Volume Claim (PVC), PV (OpenShift Administration Part-3) Red Hat Ex280
...................................
OpenShift Storage
Persistent Volume Claim (PVC)
Persistent Volume (PV)
Demo - Container with Persistent Database
** If new to Docker, Podman, Kubernetes and Openshift then first see -- [ Ссылка ]
commands--
oc get storageclass
oc new-app --name postgresql-persistent --image registry.redhat.io/rhel8/postgresql-13:1-7 -e POSTGRESQL_USER=redhat -e POSTGRESQL_PASSWORD=redhat123 -e POSTGRESQL_DATABASE=persistentdb
oc set volumes deployment/postgresql-persistent --add --name postgresql-storage --type pvc --claim-class nfs-storage --claim-mode rwo --claim-size 10Gi --mount-path /var/lib/pgsql --claim-name postgresql-storage
oc get pvc
oc get pv
oc delete all -l app=postgresql-persistent
oc new-app --name postgresql-persistent2 --image registry.redhat.io/rhel8/postgresql-13:1-7 -e POSTGRESQL_USER=redhat -e POSTGRESQL_PASSWORD=redhat123 -e POSTGRESQL_DATABASE=persistentdb
oc set volumes deployment/postgresql-persistent2 --add --name postgresql-storage --type pvc --claim-name postgresql-storage --mount-path /var/lib/pgsql
oc delete all -l app=postgresql-persistent2
oc delete pvc/postgresql-storage
Ещё видео!