티스토리 뷰

ingress 상태에 아래와 같이 메시지 출력됨

/   ssl-redirect:use-annotation (<error: endpoints "ssl-redirect" not found>)

ssl-redirect는 정상 작동 중임

현재는 아래와 같이 manifest가 선언되어있음

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  namespace: default
  name: ingress
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-west-2:xxxx:certificate/xxxxxx
    alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
    alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}'
spec:
  rules:
    - http:
        paths:
         - path: /*
           backend:
             serviceName: ssl-redirect
             servicePort: use-annotation
         - path: /users/*
           backend:
             serviceName: user-service
             servicePort: 80
         - path: /*
           backend:
             serviceName: default-service
             servicePort: 80

공식문서 참고 결과 V2.3부터 manifest문법이 변경됨 (현재 사용버전 2.4)

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  namespace: default
  name: ingress
  annotations:
    alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-west-2:xxxx:certificate/xxxxxx
    alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
    alb.ingress.kubernetes.io/ssl-redirect: '443'
spec:
  ingressClassName: alb
  rules:
    - http:
        paths:
         - path: /users/*
           pathType: ImplementationSpecific
           backend:
             service:
               name: user-service
               port:
                 number: 80
         - path: /*
           pathType: ImplementationSpecific
           backend:
             service:
               name: default-service
               port:
                 number: 80

좀더 간소화 된듯

 

heml및 dev-deploy manifest에서 변경된 manifest문법으로 변경 필요

 

최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
글 보관함