Ensure Minikube is running and ready to accept your upcoming declarations.
Deploy a simple application called echoserver.
kubectl create -f echoserver.yaml
A simpler way to do this is with the run command, but this only creates a Pod. We actually want a Deployment with a ReplicaSet
kubectl run hello --generator=run-pod/v1 --image=k8s.gcr.io/echoserver:1.9 --port=8080
Take a look at the YAML files that defines this application.
Notice this not only defines a
kind: Deployment, but inside the deployment is a
ReplicaSet of a 'Pod' and that pod consists of one
Container. The Deployment is a preferred way of deploying applications instead of simply standing up just a Pod. You may see the advantage in the later step that scales the application.
It's only about 44 MB so it downloads and starts within a few moments. Ensure the Available status changes from 0 to 1.
kubectl get deployments,pods
With this the application is running, however it's not accessible. A service is needed for access.