Write a simple hello world application in any one of these languages: Python, Ruby, Go. Build the application within a Docker container and then load balance the application within minikube. You are not required to automate the installation of minikube on the host machine.
Route | Description |
---|---|
/health | Health check for the application |
/echo | Returns basic information on the host |
Builds and deploys the application to Minikube:
make deploy
Other commands:
> make help
Choose a command to run in my-hello-world-app-go:
install Install missing dependencies. Runs `go get` internally. e.g; make install get=github.com/foo/bar
start Start in development mode
stop Stop development mode.
compile Compile the binary.
exec Run given command, wrapped with custom GOPATH. e.g; make exec run="go test ./..."
clean Clean build files. Runs `go clean` internally.
test Run the unit tests
deploy Builds and deploys the application to Minikube
minikube-validate Checks whether minikube is running
minikube-start Start minikube using kubernetes version 1.16.4
k8s-set-minikube Sets the kubernetes context to minikube and the hello-world namespace
When you've got the application running, navigate to the /echo
route and view the hostname, which is the name of the pod.
# replace the hostname and delete the pod
kubectl delete --namespace hello-world pod {HOSTNAME}
Reload the application, and it will assign you a healthy pod.