---
title: What is Kubernetes Ingress?
url: https://www.vmware.com/topics/kubernetes-ingress
description: Learn about Kubernetes ingress, an API object that manages external access to Kubernetes cluster services.
---

# What is Kubernetes Ingress?

[Kubernetes](https://www.vmware.com/topics/kubernetes) Ingress is an API object that manages external access to [Kubernetes cluster](https://www.vmware.com/topics/kubernetes-cluster) services, typically HTTP and HTTPS requests. An ingress object may provide multiple services, including [SSL termination](https://www.vmware.com/topics/ssl-termination), [load balancing](https://www.vmware.com/topics/load-balancing), and name-based virtual hosting.

Below is a Kubernetes Ingress diagram:

![kubernetes-ingress-diagram-v2.png](https://www.vmware.com/media/blt8c9a8aaca0ffd4ac/blt5877b10cc5707913/69825377798758030e8fccc4/kubernetes-ingress-diagram-v2.png)

## Why Kubernetes Ingress is needed

While a Kubernetes load balancer is used to route HTTP and HTTPS traffic, it's important to understand that this is only the most evident application of ingress load balancing.

There are additional important ingress requirements for Kubernetes services, including:

- Authentication,
- Content-based routing, such as routing based on HTTP request headers, HTTP method, or other specific requests,
- Support for multiple protocols, and
- Resilience, such as timeouts and rate limiting.

Support for some or all of these capabilities is important for all but the simplest cloud applications. Critically, it may be necessary to manage many of these requirements at the service level, inside Kubernetes.

A load balancer, [network load balancer](https://www.vmware.com/topics/network-load-balancer), or load balancer service is the standard way to expose a service to the internet. All traffic is forwarded to the service at a single Kubernetes ingress load balancer IP address.

Ingress is a complex yet powerful way to expose services, and there are many types of ingress controllers, as well as plugins for ingress controllers. Ingress is useful for exposing multiple services using the same L7 protocol (typically HTTP) under the same external IP address.

## Kubernetes Ingress benefits

Kubernetes Ingress benefits include:

- **Load balancing:** Ingress can distribute traffic across multiple replicas of a service, ensuring high availability and scalability.
- **SSL/TLS termination:** Ingress controllers can handle SSL/TLS termination, offloading the encryption/decryption workload from the application services.
- **Name-based virtual hosting:** Ingress allows multiple services to be exposed on the same IP address, using different hostnames.
- **Path-based routing:** Ingress can route traffic to different services based on the URL path, simplifying the management of complex applications.
- **Canary deployments:** Ingress can be used to implement canary deployments, gradually routing traffic to a new version of a service for testing purposes.

## Ingress and ingress controllers

In Kubernetes, as pods are created, selector labels are assigned to them. Then, it’s typical to group them under a Service, rather than making the pods directly accessible. This makes the pods available, although only from within the same cluster, at a single cluster IP address.

The pods can be replaced, scaled up, or down at any time. The Service hides the ephemeral nature of the pods, acting both as a layer of abstraction and performing very basic round-robin load balancing.

However, a Service is accessible only to nearby pods inside the cluster. This presented a new challenge for Kubernetes operators: granting clients outside the cluster access to services.

Allocating an external load balancer or random port is relatively simple to implement, but presents unique challenges. Defining multiple NodePort services and Load Balancer services can lead to increased use of resources and too much complexity. The next idea was creating a new layer of abstraction that might contain or reduce this complexity so that many internal services could be exposed via one load balancer or a random port. 

The result was the ingress, a single entry point behind which many services could be consolidated. The ingress itself declares the user wants clients to be routed to services. The ingress rule or manifest doesn’t do anything itself; to watch for these declarations and act upon them, users must deploy ingress controllers.

An ingress is a rule that governs how a service securely inside the Kubernetes cluster can safely access the outside world to allow user access. An ingress controller, a proxy, sits at the edge of the cluster’s network waiting for new rules. It processes them and maps each service to a specific domain name or URL path for public use. It is the Kubernetes project itself that develops and maintains the ingress, but other open source projects develop ingress controllers, implement them, and create unique features.

Just like other applications, ingress controllers are pods, visible parts of the cluster. Ingress controllers are built using underlying reverse proxies that lend them load balancing and Layer 7 routing capabilities. Each proxy is its own product with a unique set of features.

Ingress controller deployments are themselves inside the cluster, walled in like other Kubernetes pods. A service with a type of either load balancer or NodePort is required to expose Ingress Controllers to the outside. However, now many internal pods connect to one ingress controller, which itself connects to one Service: a single entry point for all traffic. The ingress controller inspects HTTP requests and identifies the correct pod for each client based on the domain name, the URL path, or other characteristics it detects.

The ingress controller is tasked with fulfillment based on the declarations in the ingress. This declarative aspect of the ingress manifest allows users to specify goals and needs without needing to hash out those fulfillment specifics. As new ingress rules are issued, the ingress controller identifies them and the corresponding routes, and configures its underlying proxy in response.

After the ingress controller is installed and the definition of ingress manifests, there isn’t much to managing the controller. The ingress controller instantly wires up the manifests once they are defined, distinct from the service they refer to, and the controller works quietly in the background, managing when the public may access the service.

In Kubernetes environments, an ingress controller is a kind of specialized load balancer. For managing containerized applications, Kubernetes has become the de facto standard, but moving production workloads into Kubernetes creates additional application traffic management complexities for many businesses. An ingress controller serves as a bridge between Kubernetes and external services by abstracting the complexity of Kubernetes application traffic routing.

Kubernetes Ingress controller basics:

- Continuously monitor the Kubernetes pods, and as pods are added or removed from a service, automatically update load balancing rules
- Accept outside traffic and load balance it to containers running inside the Kubernetes platform
- Manage in-cluster egress traffic for services that need to communicate with outside services
- Use the Kubernetes API to deploy ingress resources and configuration files, and the kubectl apply and other syntax tools to run basic commands

Ingress controllers help route external traffic to Kubernetes clusters. But in practice, except for all but the simplest cloud applications, Kubernetes services typically also impose other requirements on ingress.

For example:

- Security needs such as authentication and access control, TLS termination, and allowlist/denylist
- Need for traffic management and service discovery, including content-based routing, such as routing based on request headers, namespace ingress, HTTP method, or other specific request properties
- Resilience challenges, such as DOS detection and mitigation, timeouts, and rate limiting
- Multiple protocols in need of support
- Demand for observability and insights

To manage these concerns at the service level inside Kubernetes, many Kubernetes ingress controller options exist, and there are several approaches. Any Kubernetes Ingress controllers comparison necessarily should consider supported protocols, traffic routing capabilities, underlying software, upstream probes, namespace limitations, traffic distribution, authentication, load balancing algorithms, WAF capabilities, customizability, and other features. This is why, in Kubernetes, multiple ingress controllers exist.

When choosing an ingress controller, in most situations, it pays to begin with an external load balancer, regardless of ingress strategy. This load balancer provides an IP address, a stable endpoint, for external traffic to access. The load balancer then routes traffic to an ingress or Kubernetes service on the Kubernetes cluster to conduct service-specific routing.

NodePorts are not designed to be directly used for production, and both Kubernetes services and ingress controllers require an external load balancer.

## Kubernetes Ingress Services

A Kubernetes cluster is made up of node machines. Inside pods grouped based on the type of service they provide, these machines run containerized applications. A set of pods must be capable of accepting connections from inside or outside the cluster. Yet both internal and external access are challenging.

The node’s IP address cannot access pods inside the cluster for external access, yet users must communicate with the application using the node’s IP address. And while each pod in the system has its own unique Pod IP assigned, these are unreliable for internal communication because they are not static. This means persistent internal and external access for the cluster is critical.

A service is a Kubernetes object that acts as a stable address for pods, serving as an endpoint enabling communication between components inside and outside the application.

The three important Kubernetes service types are:

- **ClusterIP:** The default ingress service in Kubernetes is ClusterIP. Unless the user manually defines another type, a service will be exposed on a ClusterIP.
- **NodePort:** Using NodePort in a service YAML causes Kubernetes to allocate a specific port on each node for cluster requests. While simple to manage, allowing clients to target any node on one port, it's less robust. Service ports are randomly allocated, non-standard (30000-32767), and can be re-allocated. This randomness complicates firewall and NAT configurations.
- **LoadBalancer:** Setting a service's type to LoadBalancer in its YAML spreads workloads across Kubernetes clusters and exposes the service externally, providing failover. This requires an external load balancer, typically provided by a cloud provider like AWS EKS or Google GKE, which assigns a new public IP for each service, leading to potentially high costs and many load balancers.

In contrast, Kubernetes Ingress is an independent resource that decouples external exposure from the services. Ingress controllers are pods built with reverse proxies that can see other pods and offer Layer 7 routing and load balancing. Like other pods, they require a LoadBalancer or NodePort service for access. However, an Ingress controller can route traffic through a single external service to many internal pods, directing requests based on HTTP characteristics like domain or path.

Ingress uses a declarative approach where the ingress controller configures its underlying proxy to enact the specified routing rules. While an ingress controller must be configured, this is easily done using solutions like the Avi Load Balancer or Nginx Ingress Controller, many of which are open-source and compatible across different cloud environments.

These all allow users to expose a service to external network requests and send requests from outside the Kubernetes cluster to services inside the cluster.

## Kubernetes Ingress vs. Services

There is a difference between ingress and service in Kubernetes. A Kubernetes service is a logical abstraction for a group of pods that perform the same function deployed in a cluster. A service enables a group of pods, which are ephemeral, to provide specific functions such as image processing or web services, with an assigned name and ClusterIP, a unique IP address.

By using a cluster-internal IP, Kubernetes’ default service type, ClusterIP, limits access to the service to within the cluster. ClusterIP allows pods to communicate with each other inside a cluster, only.

Users can also set NodePort as the service type as another Kubernetes networking option. NodePort allows users to configure load balancers to support environments that Kubernetes does not support completely. NodePort opens up a way for external traffic to reach the nodes by exposing their IP addresses.

This brings us to the difference between service and ingress in Kubernetes. An ingress vs service in Kubernetes is an API object that manages outside access to Kubernetes cluster services, generally via HTTPS/HTTP, by providing routing rules. Users can consolidate routing rules into a single custom resource and create a set of rules for moving traffic without multiple load balancers or exposing each service on the node with ingress routes.

Comparing the NodePort or LoadBalancer Kubernetes services vs ingress, ingress is an entry point that rests in front of multiple services in the cluster, not a type of service. NodePorts are simple to use and convenient, especially at the dev/test stage, but compared to Kubernetes ingress services, they have many weaknesses. Here are some of the other Kubernetes ingress and service differences:

- To reach the service, clients must know node IP addresses; ingress makes hiding cluster internals, such as numbers and IP addresses of nodes, and using a DNS entry simpler.
- NodePort increases the complexity of secure Kubernetes cluster management because it demands opening external port access to each node in the cluster for every service.
- Using NodePort with a proliferation of clusters and services, reasoning about network access and troubleshooting rapidly becomes very complex.

Finally, consider the difference between a Kubernetes deployment, service, and ingress. While often declared in a YAML file, a Kubernetes Deployment is actually an active API object and controller running inside the cluster. It constantly monitors and manages the desired state of your pods. For example, a Deployment controller can automatically roll out a new container image version, managing the underlying ReplicaSets to ensure there is no downtime. In short: a Deployment manages the lifecycle of the pods, a Service provides a stable internal network endpoint for them, and an Ingress exposes those Services to the outside world.

## Ingress Controller vs. Services

This is the same contrast between the Ingress Controller and the API gateway. Ingress strategies center on service-specific ingress management: selecting the right options for managing traffic between services and the external load balancer. Businesses can develop and deploy their own custom ingress controller or other configurations, but most instead choose either a standard ingress controller or an API gateway deployed as a Kubernetes service.

The choice focuses on actual capabilities. Because the ingress resource is an imprecise, less-than-portable standard focused on basic functionality, many Kubernetes ingress controllers have extended the ingress resource with custom annotations.

## Ingress Controller vs. Load Balancer

An ingress is merely a set of routing rules. Without an ingress controller actively watching and processing these rules, nothing will happen after deploying them.

It is important to distinguish this from a standard LoadBalancer Service. A Kubernetes LoadBalancer Service provisions an external cloud load balancer to route raw TCP/UDP traffic (Layer 4) into the cluster—usually directing it straight to the ingress controller. The LoadBalancer Service itself does not parse or act on Ingress rules. Instead, the ingress controller takes that raw traffic and routes it to specific backend services based on Layer 7 criteria (like URL paths or hostnames).

## Ingress Controller vs. Service Mesh

Adoption of service mesh has become more mainstream as organizations heighten investment in containerized apps and microservices. Increased container use indicates more organizations need advanced security tools and traffic management, and might benefit from a service mesh; three of the top container challenges are interrelated.

However, implementing a service mesh or other advanced API management solution too soon simply adds expense and risk that outweigh any benefits. When it comes to the ingress controller vs service mesh vs API gateway comparison, consider these points:

- **How invested the user is in Kubernetes:** Whether the user has moved the production environment into Kubernetes already or is just starting to test migrating apps to container workloads, consider whether the long-term roadmap for application management includes Kubernetes.
- **Users need for mutual TLS (mTLS) and a zero-trust production environment between services:** Some users will be forced to increase their service-level security, while others need to maintain the zero-trust level of security they already rely on for production apps in the containerized environment.
- **Maturity of the CI/CD pipeline:** Mature deployments include programmatic procedural use of Kubernetes apps and Kubernetes infrastructure.
- **Complexity in depth and number of services:** Large, distributed apps with many API dependencies typically demand external dependencies.
- **Frequent deployment to production:** This means daily, typically, with near-constant updates of apps in production.
- **[DevOps](https://www.vmware.com/topics/devops) team can manage the service mesh:** Because DevOps teams often handle administration within the cluster, even if the NetOps team manages the service mesh, DevOps must also be ready to handle the service mesh in addition to the rest of their stack.

## How VMware products can help

[Avi](https://www.vmware.com/products/cloud-infrastructure/advanced-services/avi-load-balancer) addresses the complexities of deploying modern application services in Kubernetes environments by providing a unified, software-defined platform. It offers comprehensive traffic management, security, and observability features with robust automation and scalability. Avi’s integration with Kubernetes, Gateway API, [CI/CD](https://www.vmware.com/topics/cicd) pipelines, [VMware Cloud Foundation](https://www.vmware.com/products/cloud-infrastructure/vmware-cloud-foundation), and [Tanzu](https://www.vmware.com/products/app-platform/tanzu) simplifies operations, enhances resilience, and delivers enterprise-grade security, enabling organizations to deploy production-ready [containerized](https://www.vmware.com/topics/containers) applications efficiently.

## Recommended for You

- [Kubernetes](https://www.vmware.com/topics/kubernetes)
- [Containers](https://www.vmware.com/topics/containers)
- [DevOps](https://www.vmware.com/topics/devops)
- [Load Balancing](https://www.vmware.com/topics/load-balancing)

## Related Products and Solutions

- [VMware Avi Load Balancer](https://www.vmware.com/products/cloud-infrastructure/advanced-services/avi-load-balancer)
- [Kubernetes Ingress](https://www.vmware.com/solutions/cloud-infrastructure/load-balancing/kubernetes-ingress)
- [VMware vSphere Kubernetes Service](https://www.vmware.com/products/cloud-infrastructure/vsphere-kubernetes-service)

## Also of Interest

- [What is Platform Engineering?](https://www.vmware.com/topics/platform-engineering)
- [What are Kubernetes Services?](https://www.vmware.com/topics/kubernetes-services)
- [What is Kubernetes (K8s)?](https://www.vmware.com/topics/kubernetes)
