Minimalistic hello world REST API written Go.
On any request it returns
{
"message": "hello world",
"version": 0
}
docker run --rm -p 8080:8080 helloworld-restapi:latest
you can change latest
to 1.0
or 2.0
to simulate different APIs.
Build app
go build
Run
./helloworld-restapi
docker build . -t helloworld-restapi:latest
To run the image execute
docker run --rm -p 8080:8080 helloworld-restapi:latest
To the image try this URLs
predefined deployment.yaml
kubectl create namespace restapi
kubectl -n restapi apply -f k8s/deployment.yaml
or manually
kubectl -n restapi create deployment restapi --image lkrzyzanek/helloworld-restapi:latest
kubectl -n restapi expose deployment restapi --type=NodePort --port=8080