Questions tagged [kubernetes-health-check]
215 questions
306
votes
1 answer
Where does the convention of using /healthz for application health checks come from?
In the Kubernetes/Docker ecosystem there is a convention of using /healthz as a health-check endpoint for applications.
Where does the name 'healthz' come from, and are there any particular semantics associated with that name?

Andy Hume
- 40,474
- 10
- 47
- 58
44
votes
8 answers
Kubernetes: How do I delete PV in the correct manner
The stateful set es-data was failing on our test environment and I was asked to delete corresponding PV.
So I deleted the following for es-data:
1) PVC
2) PV
They showed as terminating and was left for the weekend. Upon arriving this morning they…

mac
- 1,479
- 3
- 11
- 21
36
votes
2 answers
When to use Docker HEALTHCHECK vs livenessProbe / readinessProbe
The new ability to specify a HEALTHCHECK in a Dockerfile seems redundant with the Kubernetes probe directives. Any advice on what to use when?

Kushal Dave
- 1,034
- 2
- 9
- 10
25
votes
3 answers
What is the default value of initialDelaySeconds?
Kubernetes' liveness and readiness probes for pods (deployment) can be configured with this initial delay ---- meaning the probe will start after this many seconds after the container is up. If it is not specified, what is the default value? I can't…

RyanDing
- 377
- 1
- 3
- 9
21
votes
5 answers
Should Health Checks call other App Health Checks
I have two API's A and B that I control and both have readiness and liveness health checks. A has a dependency on B.
A
/foo - This endpoint makes a call to /bar in B
/status/live
/status/ready
B
/bar
/status/live
/status/ready
Should the readiness…

Muhammad Rehan Saeed
- 35,627
- 39
- 202
- 311
19
votes
4 answers
Kubernetes - Rolling update killing off old pod without bringing up new one
I am currently using Deployments to manage my pods in my K8S cluster.
Some of my deployments require 2 pods/replicas, some require 3 pods/replicas and some of them require just 1 pod/replica. The issue Im having is the one with one pod/replica.
My…
user4889345
19
votes
1 answer
How to define a liveness command
A livenessProbe (extracted from an example) below is working well.
livenessProbe:
exec:
command:
- cat
- /tmp/healthy
But, my livenessProbe is not working.(pod is continually restarted).
YAML is below
apiVersion: v1
kind:…

jazzsir
- 609
- 2
- 7
- 14
18
votes
4 answers
How to get a custom healthcheck path in a GCE L7 balancer serving a Kubernetes Ingress?
I'm trying to deploy a grafana instance inside Kubernetes (server 1.6.4) in GCE. I'm using the following manifests:
Deployment (full version):
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: grafana
spec:
replicas: 1
template:
…

mmoya
- 1,901
- 1
- 21
- 30
16
votes
7 answers
Monitoring a kubernetes job
I have kubernetes jobs that takes variable amount of time to complete. Between 4 to 8 minutes. Is there any way i can know when a job have completed, rather than waiting for 8 minutes assuming worst case. I have a test case that does the…

trial999
- 1,646
- 6
- 21
- 36
15
votes
4 answers
What should the HTTP Status Code of a Degraded Health Check Be?
I have a health check endpoint at /status that returns the following status codes and response bodies:
Healthy - 200 OK
Degraded - ?
Unhealthy - 503 Service Unnavailable
What should the HTTP status code be for a degraded response be? A 'degraded'…

Muhammad Rehan Saeed
- 35,627
- 39
- 202
- 311
14
votes
5 answers
GCE Ingress not picking up health check from readiness probe
When I create a GCE ingress, Google Load Balancer does not set the health check from the readiness probe. According to the docs (Ingress GCE health checks) it should pick it up.
Expose an arbitrary URL as a readiness probe on the pods backing the…

Amarjeet Singh Rai
- 881
- 2
- 9
- 20
13
votes
1 answer
What is the signal sent to the process running in the container when k8s liveness probe fails? KILL or TERM
I have a use case to gracefully terminate the container where i have a script to kill the process gracefully from within the container by using the command "kill PID".( Which will send the TERM signal )
But I have liveness probe configured as…

Beatrix Kiddo
- 199
- 1
- 2
- 10
13
votes
6 answers
Error while executing and initializing kubeadm
While initializing kubeadm I am getting following errors. I have also tried command kubeadm reset before doing kubadm init. Kubelet is also running and command I have used for same is systemctl enable kubelet && systemctl start kubelet. Following is…

rishi007bansod
- 1,283
- 2
- 19
- 45
13
votes
1 answer
How to verify that a Kubernetes deployment update has been successful?
I have a simple Kubernetes deployment. It consists of a single, unreplicated container. There is no service exposing the container. The container has a health check which checks that it is correctly configured and can communicate with its external…

Ben Butler-Cole
- 2,011
- 1
- 17
- 23
13
votes
2 answers
Define a livenessProbe with secret httpHeaders
I want to define a livenessProbe with an httpHeader whose value is secret.
This syntax is invalid:
livenessProbe:
httpGet:
path: /healthz
port: 8080
httpHeaders:
- name: X-Custom-Header
valueFrom:
secretKeyRef:
…

Jenna Quindica
- 204
- 3
- 6