A tool for observing Kubernetes healthchecks and signals
357
k8s-signal-logger is a simple program for observing how Kubernetes responds to liveness and readiness probes
There are 3 endpoints to the container:
/healthz - Used for the health check/ready - Used for the readiness check/ - A homepage handler - always responds with 200If a SIGTERM is sent by Kubernetes, the signal is logged to STDOUT and ignored. This way, you can see
if/how much traffic is still being sent to the pod once it is supposed to be in a 'shutdown' mode.
The following commands run:
kubectl create -f deployment.yaml -f service.yaml
export PORT=$(kubectl get -f service.yaml -o json | jq -r .spec.ports[0].nodePort)
export NODE=$(kubectl get no -o json | jq -r .items[0].status.addresses[0].address)
ab -n 1000000 -c 20 http://$NODE:$PORT/
# In a separate terminal
# - change a label on deployment.yaml
kubectl replace -f deployment.yaml
MIT License. See License for full text
Content type
Image
Digest
Size
6 MB
Last updated
almost 10 years ago
docker pull micahhausler/k8s-signal-logger