Top Related Projects
NGINX and NGINX Plus Ingress Controllers for Kubernetes
The Cloud Native Application Proxy
Connect, secure, control, and observe services.
Contour is a Kubernetes ingress controller using Envoy proxy.
:gorilla: Kong for Kubernetes: The official Ingress Controller for Kubernetes.
Quick Overview
The kubernetes/ingress-nginx project is an Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer. It provides a robust and feature-rich solution for managing external access to HTTP and HTTPS services in a Kubernetes cluster, offering advanced traffic routing, SSL/TLS termination, and various customization options.
Pros
- Highly configurable and flexible, supporting a wide range of use cases
- Excellent performance and scalability, suitable for high-traffic environments
- Active community support and regular updates
- Extensive documentation and integration with Kubernetes ecosystem
Cons
- Steeper learning curve compared to some simpler Ingress controllers
- Resource-intensive for large-scale deployments
- Configuration complexity can lead to potential misconfigurations
- May require additional setup for certain advanced features
Code Examples
- Basic Ingress resource:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- host: example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: example-service
port:
number: 80
This example defines a basic Ingress resource that routes traffic for example.com
to an example-service
on port 80.
- Configuring SSL/TLS:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: tls-example-ingress
annotations:
kubernetes.io/ingress.class: nginx
spec:
tls:
- hosts:
- secure.example.com
secretName: tls-secret
rules:
- host: secure.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: secure-service
port:
number: 443
This example shows how to configure SSL/TLS for an Ingress resource using a secret containing the certificate and key.
- Rate limiting configuration:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: rate-limit-example
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/limit-rps: "10"
spec:
rules:
- host: api.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: api-service
port:
number: 8080
This example demonstrates how to apply rate limiting to an Ingress resource, limiting requests to 10 per second.
Getting Started
- Install the NGINX Ingress Controller:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.8.1/deploy/static/provider/cloud/deploy.yaml
- Create an Ingress resource:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: minimal-ingress
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- http:
paths:
- path: /testpath
pathType: Prefix
backend:
service:
name: test
port:
number: 80
- Apply the Ingress resource:
kubectl apply -f ingress.yaml
- Verify the Ingress is working:
kubectl get ingress
Competitor Comparisons
NGINX and NGINX Plus Ingress Controllers for Kubernetes
Pros of kubernetes-ingress
- Commercial support available from NGINX, Inc.
- Advanced features like JWT validation and app protect WAF
- More granular configuration options for NGINX-specific settings
Cons of kubernetes-ingress
- Steeper learning curve due to more complex configuration
- Less community-driven development compared to ingress-nginx
- May require a commercial license for certain advanced features
Code Comparison
ingress-nginx configuration:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
rules:
- host: example.com
http:
paths:
- path: /prefix(/|$)(.*)
pathType: Prefix
backend:
service:
name: example-service
port:
number: 80
kubernetes-ingress configuration:
apiVersion: k8s.nginx.org/v1
kind: VirtualServer
metadata:
name: example-virtual-server
spec:
host: example.com
upstreams:
- name: example-upstream
service: example-service
port: 80
routes:
- path: /prefix
action:
proxy:
upstream: example-upstream
rewritePath: /$request_uri
Both ingress controllers offer robust solutions for managing ingress in Kubernetes clusters. ingress-nginx is more widely adopted and community-driven, while kubernetes-ingress provides advanced features and commercial support. The choice between them depends on specific project requirements and preferences.
The Cloud Native Application Proxy
Pros of Traefik
- More versatile, supporting multiple platforms beyond Kubernetes
- Built-in automatic HTTPS with Let's Encrypt integration
- Dynamic configuration with real-time updates
Cons of Traefik
- Steeper learning curve due to more complex configuration options
- Less specialized for Kubernetes-specific use cases
- Potentially higher resource usage in some scenarios
Code Comparison
ingress-nginx configuration:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
rules:
- host: example.com
http:
paths:
- path: /prefix(/|$)(.*)
pathType: Prefix
backend:
service:
name: example-service
port:
number: 80
Traefik configuration:
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: example-ingressroute
spec:
entryPoints:
- web
routes:
- match: Host(`example.com`) && PathPrefix(`/prefix`)
kind: Rule
services:
- name: example-service
port: 80
middlewares:
- name: strip-prefix
Both ingress-nginx and Traefik are popular ingress controllers for Kubernetes, but they have different strengths and use cases. ingress-nginx is more focused on Kubernetes-specific deployments, while Traefik offers broader platform support and additional features like automatic HTTPS. The choice between them depends on specific project requirements and the desired level of complexity in configuration.
Connect, secure, control, and observe services.
Pros of Istio
- Offers comprehensive service mesh capabilities beyond just ingress control
- Provides advanced traffic management, security, and observability features
- Supports multi-cluster and multi-cloud deployments
Cons of Istio
- More complex to set up and manage compared to simpler ingress solutions
- Higher resource overhead due to its extensive feature set
- Steeper learning curve for teams new to service mesh concepts
Code Comparison
Ingress-Nginx configuration example:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
spec:
rules:
- host: example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: example-service
port:
number: 80
Istio Virtual Service example:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: example-vs
spec:
hosts:
- example.com
http:
- route:
- destination:
host: example-service
port:
number: 80
While Ingress-Nginx focuses on ingress traffic management, Istio provides a more comprehensive approach to service-to-service communication and traffic management within the cluster. Istio's configuration is more verbose but offers greater flexibility and advanced features for complex scenarios.
Contour is a Kubernetes ingress controller using Envoy proxy.
Pros of Contour
- Designed for high-performance and scalability, particularly suitable for large-scale deployments
- Supports advanced traffic routing features like weighted load balancing and canary deployments
- Utilizes Envoy proxy, offering more flexibility and modern networking capabilities
Cons of Contour
- Steeper learning curve compared to ingress-nginx due to its more complex architecture
- Less widespread adoption and community support than ingress-nginx
- May require additional resources and configuration for smaller deployments
Code Comparison
ingress-nginx configuration:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- host: example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: example-service
port:
number: 80
Contour configuration:
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
name: example-proxy
spec:
virtualhost:
fqdn: example.com
routes:
- conditions:
- prefix: /
services:
- name: example-service
port: 80
Both configurations achieve similar results, but Contour uses its custom HTTPProxy resource for more advanced routing capabilities.
:gorilla: Kong for Kubernetes: The official Ingress Controller for Kubernetes.
Pros of kubernetes-ingress-controller
- Built-in API gateway functionality with advanced features like rate limiting and authentication
- Extensive plugin ecosystem for extending functionality
- Better performance and scalability for high-traffic environments
Cons of kubernetes-ingress-controller
- Steeper learning curve due to additional features and complexity
- Requires more resources to run compared to ingress-nginx
- May be overkill for simple use cases or smaller deployments
Code Comparison
ingress-nginx configuration:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
spec:
rules:
- host: example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: example-service
port:
number: 80
kubernetes-ingress-controller configuration:
apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
name: example-kong-ingress
route:
protocols:
- http
- https
strip_path: true
upstream:
hash_on: none
hash_fallback: none
healthchecks:
active:
healthy:
http_statuses:
- 200
interval: 5
successes: 5
The kubernetes-ingress-controller configuration allows for more detailed customization of routing, upstream behavior, and health checks, while ingress-nginx uses a simpler configuration focused on basic routing.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Ingress NGINX Controller
Overview
ingress-nginx is an Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer.
Learn more about Ingress on the Kubernetes documentation site.
Get started
See the Getting Started document.
Troubleshooting
If you encounter issues, review the troubleshooting docs, file an issue, or talk to us on the #ingress-nginx channel on the Kubernetes Slack server.
Changelog
See the list of releases for all changes.
For detailed changes for each release, please check the changelog-$version.md file for the release version.
For detailed changes on the ingress-nginx
helm chart, please check the changelog folder for a specific version.
CHANGELOG-$current-version.md file.
Supported Versions table
Supported versions for the ingress-nginx project mean that we have completed E2E tests, and they are passing for the versions listed. Ingress-Nginx versions may work on older versions, but the project does not make that guarantee.
Supported | Ingress-NGINX version | k8s supported version | Alpine Version | Nginx Version | Helm Chart Version |
---|---|---|---|---|---|
ð | v1.11.2 | 1.30, 1.29, 1.28, 1.27, 1.26 | 3.20.0 | 1.25.5 | 4.11.2 |
ð | v1.11.1 | 1.30, 1.29, 1.28, 1.27, 1.26 | 3.20.0 | 1.25.5 | 4.11.1 |
ð | v1.11.0 | 1.30, 1.29, 1.28, 1.27, 1.26 | 3.20.0 | 1.25.5 | 4.11.0 |
ð | v1.10.4 | 1.30, 1.29, 1.28, 1.27, 1.26 | 3.20.0 | 1.25.5 | 4.10.4 |
ð | v1.10.3 | 1.30, 1.29, 1.28, 1.27, 1.26 | 3.20.0 | 1.25.5 | 4.10.3 |
ð | v1.10.2 | 1.30, 1.29, 1.28, 1.27, 1.26 | 3.20.0 | 1.25.5 | 4.10.2 |
ð | v1.10.1 | 1.30, 1.29, 1.28, 1.27, 1.26 | 3.19.1 | 1.25.3 | 4.10.1 |
ð | v1.10.0 | 1.29, 1.28, 1.27, 1.26 | 3.19.1 | 1.25.3 | 4.10.0 |
v1.9.6 | 1.29, 1.28, 1.27, 1.26, 1.25 | 3.19.0 | 1.21.6 | 4.9.1 | |
v1.9.5 | 1.28, 1.27, 1.26, 1.25 | 3.18.4 | 1.21.6 | 4.9.0 | |
v1.9.4 | 1.28, 1.27, 1.26, 1.25 | 3.18.4 | 1.21.6 | 4.8.3 | |
v1.9.3 | 1.28, 1.27, 1.26, 1.25 | 3.18.4 | 1.21.6 | 4.8.* | |
v1.9.1 | 1.28, 1.27, 1.26, 1.25 | 3.18.4 | 1.21.6 | 4.8.* | |
v1.9.0 | 1.28, 1.27, 1.26, 1.25 | 3.18.2 | 1.21.6 | 4.8.* | |
v1.8.4 | 1.27, 1.26, 1.25, 1.24 | 3.18.2 | 1.21.6 | 4.7.* | |
v1.7.1 | 1.27, 1.26, 1.25, 1.24 | 3.17.2 | 1.21.6 | 4.6.* | |
v1.6.4 | 1.26, 1.25, 1.24, 1.23 | 3.17.0 | 1.21.6 | 4.5.* | |
v1.5.1 | 1.25, 1.24, 1.23 | 3.16.2 | 1.21.6 | 4.4.* | |
v1.4.0 | 1.25, 1.24, 1.23, 1.22 | 3.16.2 | 1.19.10â | 4.3.0 | |
v1.3.1 | 1.24, 1.23, 1.22, 1.21, 1.20 | 3.16.2 | 1.19.10â | 4.2.5 |
See this article if you want upgrade to the stable Ingress API.
Get Involved
Thanks for taking the time to join our community and start contributing!
-
This project adheres to the Kubernetes Community Code of Conduct. By participating in this project, you agree to abide by its terms.
-
Contributing: Contributions of all kinds are welcome!
- Read
CONTRIBUTING.md
for information about setting up your environment, the workflow that we expect, and instructions on the developer certificate of origin that we require. - Join our Kubernetes Slack channel for developer discussion : #ingress-nginx-dev.
- Submit GitHub issues for any feature enhancements, bugs, or documentation problems.
- Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.
- Join our ingress-nginx-dev mailing list
- Read
-
Support:
- Join the #ingress-nginx-users channel inside the Kubernetes Slack to ask questions or get support from the maintainers and other users.
- The GitHub issues in the repository are exclusively for bug reports and feature requests.
- Discuss: Tweet using the
#IngressNginx
hashtag or sharing with us @IngressNginx.
License
Top Related Projects
NGINX and NGINX Plus Ingress Controllers for Kubernetes
The Cloud Native Application Proxy
Connect, secure, control, and observe services.
Contour is a Kubernetes ingress controller using Envoy proxy.
:gorilla: Kong for Kubernetes: The official Ingress Controller for Kubernetes.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot