Include http settings in application.conf for Kubernetes health checks in pekko-sample-cluster-kubernetes-scala
## Description
The current `application.conf` configuration in the `pekko-sample-cluster-kubernetes-scala` project lacks the essential `http` settings under `pekko.management`. This omission prevents the application from binding to the required port (8558), which is necessary for Kubernetes health checks. Without this configuration, Kubernetes cannot perform health checks, leading to immediate termination of the pods as they are marked unhealthy.
## Required Changes
To resolve this critical issue and stabilize pod deployment, the following `http` settings need to be explicitly defined in the `application.conf` file:
```hocon
#management-config
pekko.management {
cluster.bootstrap {
contact-point-discovery {
# pick the discovery method you'd like to use:
discovery-method = kubernetes-api
required-contact-point-nr = ${REQUIRED_CONTACT_POINT_NR}
}
}
# Add these so the pods won't get killed.
http {
port = 8558
bind-hostname = "0.0.0.0"
}
}
```
By including these settings, Kubernetes can access the management HTTP server on port 8558 for health checks, ensuring the pods are correctly recognized as healthy and operational.
关闭于 2024-05-11 3 条评论