Technical note
KubeSphere滚动更新
参考文档
- 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’
management:
endpoint:
health:
show-details: "ALWAYS"
endpoints:
web:
exposure:
include: '*'
健康测试:
curl http://10.133.0.63:30508/actuator/health/ping
{"status":"UP"}
修改K8S配置添加readinessProbe
readinessProbe:
httpGet:
scheme: HTTP
path: /actuator/health/ping
port: 4000
initialDelaySeconds: 10
periodSeconds: 5