mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-03-03 18:40:21 +00:00
aac387f2805c8bc61cdb348cb22f139656fdc2b6
k8s-podinfo
Podinfo is a tiny web application made with Go that showcases best practices of running microservices in Kubernetes.
Specifications:
- Multi-arch build and release automation (Make/TravisCI)
- Multi-platform Docker image (amd64/arm/arm64/ppc64le/s390x)
- Health checks (readiness and liveness)
- Graceful shutdown on interrupt signals
- Prometheus instrumentation (RED metrics)
- Dependency management with golang/dep
- Multi-level logging with golang/glog
- Error handling with pkg/errors
- Helm chart
Web API:
GET /prints runtime information, environment variables, labels and annotationsGET /versionprints podinfo version and git commit hashGET /metricshttp requests duration and Go runtime metricsGET /healthzused by Kubernetes liveness probeGET /readyzused by Kubernetes readiness probePOST /readyz/enablesignals the Kubernetes LB that this instance is ready to receive trafficPOST /readyz/disablesignals the Kubernetes LB to stop sending requests to this instanceGET /paniccrashes the process with exit code 255POST /echoechos the posted content, logs the SHA1 hash of the contentPOST /joblong running job, json body:{"wait":2}POST /writewrites the posted content to disk at /data/hash and returns the SHA1 hash of the contentPOST /readreceives a SHA1 hash and returns the content of the file /data/hash if existsPOST /backendforwards the call to the backend service onhttp://backend-podinfo:9898/echo
Guides
Description
Languages
Go
76.8%
CUE
11.6%
HTML
3.7%
Makefile
3.4%
Shell
2.4%
Other
2.1%