Nginx Ingress인가 Ingress Nginx인가

2023. 10. 30. 22:52DevOps/Kubernetes

정답은 둘다이다.

Nginx IngressNginx.org에서 만든 Ingress Controller

https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-manifests/

 

Installation with Manifests | NGINX Ingress Controller

Installation with Manifests This document describes how to install the NGINX Ingress Controller in your Kubernetes cluster using Kubernetes manifests. Prerequisites Note: All documentation should only be used with the latest stable release, indicated on th

docs.nginx.com

Ingress NginxKubernetes에서 Nginx 가지고 만든 Ingress Controller

https://github.com/kubernetes/ingress-nginx/blob/main/deploy/static/provider/cloud/deploy.yaml

 

그게 그거 아닌가 라고 할 수 있지만,

Nginx Ingress 설치해놓고

Ingress Nginx용 Ingress 설치해버리면 하루종일 모니터 보면서 씨름할 수 있다.

 

기본적인 Ingress 리소스 사용법은 같지만

고급 옵션들이 들어가게 되면 차이가 난다.

 

예를 들어, 아래 두 리소스의 어노테이션의 차이점을 보면 알 수 있다.

Ingress for Ingress Nginx Controller

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: sample-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - host: myapp.example.com
    http:
      paths:
      - path: /foo
        pathType: Prefix
        backend:
          service:
            name: my-service
            port:
              number: 8080

Ingress for Nginx Ingress Controller

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: sample-ingress
  annotations:
    nginx.org/rewrite-target: /
spec:
  rules:
  - host: myapp.example.com
    http:
      paths:
      - path: /foo
        pathType: Prefix
        backend:
          service:
            name: my-service
            port:
              number: 8080