GoLang webserver which purpose is to reply with the hostname and if existing, the environment variable VERSION.
Install dependencies using dep:
$ dep ensure
$ go run main.go
$ docker build -t containersol/k8s-deployment-strategies .
$ docker run -d \
--name app \
-p 8080:8080 \
-h host-1 \
-e VERSION=v1.0.0
containersol/k8s-deployment-strategies
$ curl localhost:8080
2018-01-28T00:22:04+01:00 - Host: host-1, Version: v1.0.0
Liveness and readiness probes are replying on :8086/live
and :8086/ready
.
Prometheus metrics are served at :9101/metrics
.
$ docker stop app
https://github.com/ContainerSolutions/k8s-deployment-strategies/tree/master/app