- create pv
kubectl apply -f pv.yml
- create pvc
kubectl apply -f pvc.yml
- use pvc
kubectl apply -f app.yml
- copy some file
kubectl cp $PWD/index.html podname:/usr/share/nginx/html/
- delete rc/pod
the url is my dashboard url
https://localhost:30001/api/v1/_raw/replicationcontroller/namespace/default/name/mynignx
you can still see the index.html page with the content
kubectl apply -f stateful.yml