가상 호스트 기반의 요청 처리: 같은 IP에 다른 도메인 이름으로 요청이 들어올 때 어떻게 처리할지
SSL/TLS: 보안 인증서 적용
인그레스를 사용해야하는 이유?
ingress를 통해서 엔드포인트를 하나로 만들 수 있다
외부 요청에 대한 처리 규칙을 쿠버네티스 자체 기능으로 편하게 관리 가능
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: ingress-example
annotations:
# nginx 컨트롤러에서만 사용가능한 기능. 인그레스에 정의된 경로로 들어오는 요청을 rewrite-target에 설정된 경로로 전달
# /echo-hostname을 hostname-service에는 / 로 전달됨
nginx.ingress.kubernetes.io/rewrite-target: /
# 해당 규칙을 어떤 인그레스 컨트롤러에 적용할 것인지
kubernetes.io/ingress.class: "nginx"
spec:
rules:
# 해당 도메인으로 접근하는 요청에 대한 규칙 정함
- host: alicek106.example.com
http:
# 해당 요청을 어느 서비스로 보낼지 정하는 것. 해당 path를 어느 backend에 보낼지
paths:
- path: /echo-hostname
backend:
serviceName: hostname-service
# hostname-service의 80번 포트로 보낸다
servicePort: 80
kubectl apply -f ingress-example.yaml
kubectl get ingress
실제로 외부 요청을 받아들이는 것은 인그레스 컨트롤러이다. 여러 종류가 있는데 엔진엑스걸 많이 사용한다. ingress controller에서 ingress의 규칙을 이용하는 것
Ingress
ingress 기능
인그레스를 사용해야하는 이유?
실제로 외부 요청을 받아들이는 것은 인그레스 컨트롤러이다. 여러 종류가 있는데 엔진엑스걸 많이 사용한다. ingress controller에서 ingress의 규칙을 이용하는 것
ingress의 annotation
SSL/TLS 적용가능