'Kubernetes readiness probe missing host when describing pod
I have the following readiness probe specified for one of my containers:
readinessProbe:
httpGet:
port: 3000
path: /healthz
initialDelaySeconds: 30
When I describe the pod with this readiness probe I see the following output:
Readiness: http-get http://:3000/healthz delay=30s timeout=1s period=10s #success=1 #failure=3
It seems that the path, port and other attributes are being correctly set. What seems unusual is that the IP address of the node is missing - http://:3000/healthz doesn't seem well formed. The kubernetes docs say:
For an HTTP probe, the kubelet sends an HTTP request to the specified path and port to perform the check. The kubelet sends the probe to the pod's IP address, unless the address is overridden by the optional host field in httpGet
Is it expected that when describing the pod the readiness probe is missing an IP address? If not, how do I fix this correctly?
Note, that in addition to this, I'm seeing many many warnings when looking at the events of the pod:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 11m default-scheduler Successfully assigned default/tripvector-79889c5d7d-jbxc9 to gke-tripvector2-default-pool-78cf58d9-5dgs
Normal Pulling 11m kubelet Pulling image "us-west1-docker.pkg.dev/triptastic-1542412229773/tripvector/tripvector:healthz2"
Normal Pulled 10m kubelet Successfully pulled image "us-west1-docker.pkg.dev/triptastic-1542412229773/tripvector/tripvector:healthz2" in 36.420607332s
Normal Created 10m kubelet Created container tripvector
Normal Started 10m kubelet Started container tripvector
Warning ProbeWarning 77s (x55 over 10m) kubelet Readiness probe warning:
Might these warnings be related to the IP issue above?
Here's the version of kubernetes I'm using:
❯❯❯ k version
Client Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.4-dirty", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"dirty", BuildDate:"2021-03-15T10:03:32Z", GoVersion:"go1.16.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.9-gke.1002", GitCommit:"f87f9d952767b966e72a4bd75afea25dea187bbf", GitTreeState:"clean", BuildDate:"2022-02-25T18:12:32Z", GoVersion:"go1.16.12b7", Compiler:"gc", Platform:"linux/amd64"}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
