About

Files for "Learning Kubernetes: persistent storage with Minikube"

Instructions

minikube start

Create PV & PVC

kubectl apply -f k8/persistent-volumes.yml
kubectl get pc,pvc

Build Docker Img

Use the minikube docker daemon, otherwise you will get: ErrImagePull

eval $(minikube -p minikube docker-env)
docker context show
docker build -t research:v2 docker/.

Verify:

minikube image ls

You should see: docker.io/library/research:v2

Create Deployment

kubectl apply -f k8/research-deployment.yml
kubectl get deployments,pods

Files will be created at:

SSH into minikube

List your files:

minikube ssh -- ls -ltr /data/research-vol/

Cleanup

kubectl delete -f k8/research-deployment.yml
kubectl delete -f k8/persistent-volumes.yml