【网络架构】nginxinc / kubernetes-ingress和kubernetes / ingress-nginx入口控制器之间的差异
有两个基于NGINX的Ingress控制器实现:你可以在这个repo中找到的那个(nginxinc / kubernetes-ingress)和一个来自kubernetes / ingress-nginx repo的实现。在本文档中,我们将解释这些实现之间的主要区别。此信息可帮助您根据需求选择适当的实现,或从一个实现转移到另一个实现。
我用的是哪一个?
如果您不确定正在使用哪个实现,请检查正在运行的Ingress控制器的容器映像。对于nginxinc / kubernetes-ingress Ingress控制器,其Docker镜像在DockerHub上发布,可作为nginx / nginx-ingress使用。
关键差异
下表总结了nginxinc / kubernetes-ingress和kubernetes / ingress-nginx Ingress控制器之间的主要区别。请注意,该表有两列用于nginxinc / kubernetes-ingress Ingress控制器,因为它可以与NGINX和NGINX Plus一起使用。有关使用NGINX Plus的nginxinc / kubernetes-ingress的更多信息,请阅读此处。
Aspect or Feature | kubernetes/ingress-nginx | nginxinc/kubernetes-ingress with NGINX | nginxinc/kubernetes-ingress with NGINX Plus |
---|---|---|---|
Fundamental | |||
Authors | Kubernetes community | NGINX Inc and community | NGINX Inc and community |
NGINX version | Custom NGINX build that includes several third-party modules | NGINX official mainline build | NGINX Plus |
Commercial support | N/A | N/A | Included |
Load balancing configuration via the Ingress resource | |||
Merging Ingress rules with the same host | Supported | Supported via Mergeable Ingresses | Supported via Mergeable Ingresses |
HTTP load balancing extensions - Annotations | See the supported annotations | See the supported annotations | See the supported annotations |
HTTP load balancing extensions -- ConfigMap | See the supported ConfigMap keys | See the supported ConfigMap keys | See the supported ConfigMap keys |
TCP/UDP | Supported via a ConfigMap | Supported via a ConfigMap with native NGINX configuration | Supported via a ConfigMap with native NGINX configuration |
Websocket | Supported | Supported via an annotation | Supported via an annotation |
TCP SSL Passthrough | Supported via a ConfigMap | Not supported | Not supported |
JWT validation | Not supported | Not supported | Supported |
Session persistence | Supported via a third-party module | Not supported | Supported |
Canary testing (by header, cookie, weight) | Supported via annotations | Supported via custom resources | Supported via custom resources |
Configuration templates *1 | See the template | See the templates | See the templates |
Load balancing configuration via Custom Resources | |||
HTTP load balancing | Not supported | See VirtualServer and VirtualServerRouteresources. | See VirtualServer and VirtualServerRouteresources. |
Deployment | |||
Command-line arguments *2 | See the arguments | See the arguments | See the arguments |
TLS certificate and key for the default server | Required as a command-line argument/ auto-generated | Required as a command-line argument | Required as a command-line argument |
Helm chart | Supported | Supported | Supported |
Operational | |||
Reporting the IP address(es) of the Ingress controller into Ingress resources | Supported | Supported | Supported |
Extended Status | Supported via a third-party module | Not supported | Supported |
Prometheus Integration | Supported | Supported | Supported |
Dynamic reconfiguration of endpoints (no configuration reloading) | Supported with a third-party Lua module | Not supported | Supported |
笔记:
* 1 - Ingress控制器用于生成NGINX配置的配置模板是不同的。 因此,对于相同的Ingress资源,生成的NGINX配置文件与一个Ingress控制器不同,这反过来意味着在某些情况下NGINX的行为也可能不同。
* 2 - 由于命令行参数不同,因此无法使用相同的部署清单来部署Ingress控制器。
如何交换入口控制器
如果您决定交换Ingress控制器实现,请准备好处理上一节中提到的差异。 至少,您需要开始使用其他部署清单。
原文:https://github.com/nginxinc/kubernetes-ingress/blob/master/docs/nginx-ingress-controllers.md
讨论:请加入知识星球或者小红圈【首席架构师圈】
- 89 次浏览