$ git clone git@github.com:jamesma100/k8s-primer.git
$ cd k8s-primer/
Make sure you can see your image by running docker images
.
- Start up minikube
$ minikube start
- Build local Docker image
$ cd app/
$ docker build -t simpleflask .
- Point your shell to minikube's Docker daemon:
$ eval $(minikube -p minikube docker-env)
This is important! Otherwise minikube will pull images from its own Docker registry instead of your local.
- Create a deployment
$ cd manifests/
$ kubectl create -f helloworld.yml
Verify your deployment exists and that 3 pods are running
$ kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
hello-world 3/3 3 3 6s
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
hello-world-6ffb67d86d-4nkdb 1/1 Running 0 72s
hello-world-6ffb67d86d-8s6hj 1/1 Running 0 72s
hello-world-6ffb67d86d-stzlp 1/1 Running 0 72s
- Stop your cluster
$ minikube stop