参考文档
- https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.endpoints.kubernetes-probes
- https://docs.spring.io/spring-boot/docs/2.2.6.RELEASE/actuator-api/html/#metrics
- https://blog.csdn.net/white_ice/article/details/80511588
- https://ost.51cto.com/posts/128
- https://blog.51cto.com/u_14320361/2466479
配置健康测试端点
修改Nacos配置,在application-dev.yml
中添加management.endpoint.health.show-details
参数,注意低版本的SpringBoot中endpoint
没有’s’
1 | management: |
健康测试:
1 | curl http://10.133.0.63:30508/actuator/health/ping |
修改K8S配置添加readinessProbe
1 | readinessProbe: |