1.网关拦截掉/actuator相关接口
2.服务pom加上jar包
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
3.健康接口使用/actuator/health
4.application.properties添加配置
management.endpoints.web.exposure.include=*
management.endpoint.shutdown.enabled=true
management.endpoint.health.show-details=always
5.k8s加上preStop执行命令
curl -X POST localhost:[端口]/actuator/shutdown