A simple Go application that demonstrates how Kubernetes works
275
A simple Go application that demonstrates how Kubernetes works, particularly focusing on liveness and readiness probes.
Repository: https://github.com/JumbleTron/k8s-app
/ - Home page with links to all endpoints/request - Display detailed information about the HTTP request/server - Display information about the server (hostname, OS, Go version, etc.)/healthz - Kubernetes liveness probe endpoint/readyz - Kubernetes readiness probe endpoint/toggle/ready - Toggle the readiness status (for demonstration purposes)/toggle/healthy - Toggle the health status (for demonstration purposes)# Build the application
go build -o k8s-app .
# Run the application
./k8s-app
The application will be available at http://localhost:8080
# Build the Docker image
docker build -t k8s-app:latest .
# Run the Docker container
docker run -p 8080:8080 k8s-app:latest
The application will be available at http://localhost:8080
Content type
Image
Digest
sha256:e23a54552…
Size
157.1 MB
Last updated
over 1 year ago
docker pull kielniakodu/k8s-app