A simple web app written in Go that you can used for testing.
- A Kubernetes cluster
- Docker installed and running on a machine, and a Docker Hub or private repository account configured.
-
Use Docker to build the sample code into a container.
# Build the container on your local machine docker build -t <image-tag> . # Push the container to docker registry docker push <image-tag>
-
After the build has completed and the container is pushed to docker registry, you can deploy the app into your cluster. Make sure the container image value in
helloworld-go-v1.yaml
matches the<image-tag>
you built in the previous step. Apply the configuration usingkubectl
:kubectl apply -f helloworld-go-v1.yaml
To remove the sample app from your cluster, delete the service record:
kubectl delete -f helloworld-go-v1.yaml