kubernetes alb ingress health check path 서비스마다 다르게 설정하기

1 min read

kubernetes alb ingress health check path 서비스마다 다르게 설정하기


apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: "test-ingress"
  namespace: "test"
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/healthcheck-path: /actuator/health

위와 같이 Ingress를 설정하면 공통적으로 healthcheck-path를 지정하는데 이것을 서비스마다 바꾸려면 아래 처럼 서비스에서 지정해주면 된다.


apiVersion: v1
kind: Service
metadata:
  name: "test-healthcheck-url-service"
  namespace: "test"
  annotations:
    alb.ingress.kubernetes.io/healthcheck-path: /test/actuator/health

참고자료