Let's take our first steps to building a simple application on our local minikube cluster and getting it to run.
The first thing we need to do is build a container image for our application. The simplest way to do this is to create a Dockerfile and use the docker build command.
Use your favorite text editor to create a file called Dockerfile with the following content:
Dockerfile FROM nginx:alpine RUN echo "<h1>Hello World</h1>" > /usr/share/nginx/html/index.html
To build the application, first ensure your Docker client is pointing to the Docker instance inside the Minikube VM by running:
eval $(minikube docker-env)
Then use Docker to build the image. In this case, we are tagging the image hello, but you could use any tag you wanted:
docker build -t hello:v1 .
Kubectl has a run command...