Skip to content

5.2. Ingresses

Overview

The Ingresses page manages every Ingress held on the MCM control plane in one place. An Ingress is the Kubernetes resource that routes HTTP/HTTPS traffic from outside the cluster to services inside it.

What it is for:

  • Managing multi-cluster Ingresses together
  • Configuring the routing of external HTTP/HTTPS traffic
  • Routing by host and by path
  • Managing TLS/SSL certificates
  • Distributing Ingresses through a PropagationPolicy

Where Ingresses are used:

  • Routing traffic by domain
  • Routing to microservices by path
  • HTTPS termination
  • Virtual hosting
  • Load balancing

How the Screen Is Laid Out

The Ingresses page shows the Ingress list as a table.

The Ingresses main screen

The Elements at the Top of the Page

ElementDescription
Namespace filterShows only the Ingresses of a particular namespace
Refresh buttonRefreshes the Ingress list
Create buttonOpens the dialog for creating a new Ingress
Search boxSearches by Ingress name

Table Columns

ColumnDescriptionSortable
NameThe Ingress name
NamespaceThe namespace the Ingress belongs to
HostsThe hostnames traffic is routed for
Ingress ClassThe Ingress controller in use (nginx, for example)
EndpointsThe list of external IP addresses assigned
TLSWhether TLS is enabled
AgeThe time since the Ingress was created
ActionsThe edit and delete buttons-

How the TLS State Is Shown

StateDescriptionHow it is shown
EnabledTLS is configured and HTTPS is usedA green icon plus "Enabled"
DisabledTLS is not configured; HTTP onlyShown in grey

How the Endpoints Are Shown

The Endpoints column shows the external IP addresses assigned:

  • The first two IP addresses are shown
  • Where there are many, the rest are abbreviated as "+N more"
  • For example 10.20.10.11, 10.20.10.12, +11 more

Ingress Detail

Clicking an Ingress row opens the detail panel.

Ingress detail

The Detail Panel Header

ElementDescription
Ingress nameThe name of the chosen Ingress
NamespaceThe namespace the Ingress belongs to
TLS badgeShown when TLS is enabled
Ingress ClassThe Ingress controller in use

The Action Buttons

ButtonWhat it does
RefreshRefreshes the Ingress information
EditOpens the YAML edit mode
DeleteDeletes the Ingress

The Tabs

The Overview Tab

Shows the Ingress's basic information, endpoints, and routing rules.

Basic information:

ItemDescription
NameThe Ingress name
NamespaceThe namespace the Ingress belongs to
Ingress ClassThe Ingress controller in use
HostsThe hostnames traffic is routed for
TLSWhether TLS is enabled
AgeThe time since creation
CreatedWhen the Ingress was created

Endpoints:

Shows the list of external IP addresses assigned to the Ingress:

  • Search filters the IPs
  • Each IP address has a copy button
  • The various IP addresses per cluster are shown

Rules:

Shows the routing rules per host:

ElementDescription
HostnameThe domain traffic is routed for (example.com, for example)
TLS badgeMarks TLS as enabled for that host
Open in new tabOpens that host in the browser

The rules table:

ColumnDescription
PathThe URL path (/, /api, for example)
Path TypePrefix, Exact, or ImplementationSpecific
BackendThe Service:Port to send the traffic to

The TLS Configuration Tab

Shows the Ingress's TLS/SSL certificate configuration.

The TLS configuration tab

The TLS certificate:

ItemDescription
Secret NameThe Secret holding the TLS certificate
HostsThe hostnames the certificate applies to

Note: the TLS certificate Secret has to be of type kubernetes.io/tls and hold the tls.crt and tls.key keys.

The Multi-Cluster Policies Tab

Shows the multi-cluster policies that apply to the Ingress.

The multi-cluster policies tab

PropagationPolicy:

ColumnDescription
NameThe PropagationPolicy name
NamespaceThe namespace the policy belongs to
ScopeNamespace-scoped policies / cluster-scoped policies
Target ClustersThe list of target clusters

OverridePolicy:

Shown where there are per-cluster custom settings.

The Labels Tab

Shows the list of Kubernetes labels applied to the Ingress.

The Annotations Tab

Shows the list of annotations applied to the Ingress.

Note: settings particular to an Ingress controller are mostly configured through annotations (nginx.ingress.kubernetes.io/rewrite-target, for example).

The Events Tab

Shows the Kubernetes events related to the Ingress.

Creating an Ingress

Creates a new Ingress on the MCM control plane.

Fields

FieldRequiredDescription
NameThe Ingress name
NamespaceThe namespace to deploy into
Ingress ClassThe Ingress controller to use
HostsThe hostnames to route for
RulesThe path-based routing rules
TLS-The TLS certificate setting (optional)

Ingress Examples

A basic Ingress:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-ingress
namespace: default
spec:
ingressClassName: nginx
rules:
- host: example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: my-service
port:
number: 80

An Ingress with TLS:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: tls-ingress
namespace: default
spec:
ingressClassName: nginx
tls:
- hosts:
- example.com
secretName: tls-secret
rules:
- host: example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: my-service
port:
number: 80

A multi-path Ingress:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: multi-path-ingress
namespace: default
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingressClassName: nginx
rules:
- host: example.com
http:
paths:
- path: /api
pathType: Prefix
backend:
service:
name: api-service
port:
number: 8080
- path: /web
pathType: Prefix
backend:
service:
name: web-service
port:
number: 3000

A multi-host Ingress:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: multi-host-ingress
namespace: default
spec:
ingressClassName: nginx
rules:
- host: api.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: api-service
port:
number: 8080
- host: web.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: web-service
port:
number: 3000

Editing the YAML

The "Edit YAML" tab lets you write the Ingress definition directly.

Ingress Operations

Editing an Ingress

  1. Choose the Ingress
  2. Press the "Edit" button in the detail panel
  3. Change the Ingress definition in the YAML editor
  4. Press the "Save" button

Deleting an Ingress

⚠️ Caution: deleting an Ingress makes external access on that domain impossible.

  1. Choose the Ingress to delete
  2. Press the "Delete" button in the detail panel
  3. Type the Ingress name in the confirmation dialog
  4. Press the "Delete" button

Worked Examples

Scenario 1: Creating a Basic Ingress

  1. Press the "Create" button
  2. Enter the Ingress details:
    • Name: web-ingress
    • Namespace: production
    • Ingress Class: nginx
    • Host: www.example.com
    • Path: /web-service:80
  3. Press the "Create" button
  4. Name the target clusters with a PropagationPolicy
  5. Point the domain at the Ingress endpoint in DNS

Scenario 2: Setting Up an HTTPS Ingress

  1. Create the TLS Secret first:
    apiVersion: v1
    kind: Secret
    metadata:
    name: tls-secret
    namespace: production
    type: kubernetes.io/tls
    data:
    tls.crt: <base64-encoded-cert>
    tls.key: <base64-encoded-key>
  2. Add the TLS setting when creating the Ingress:
    • TLS Secret: tls-secret
    • Host: www.example.com
  3. Check the certificate on the TLS configuration tab

Scenario 3: Routing Microservices by Path

  1. Press the "Create" button and choose the Edit YAML tab
  2. Write the multi-path rules:
    • /api/*api-service:8080
    • /auth/*auth-service:8081
    • /frontend-service:3000
  3. Press the "Create" button
  4. Confirm traffic is routed correctly on each path

Scenario 4: Checking an Ingress's Endpoints

  1. Click the Ingress you want to check in the list
  2. Look at the Endpoints section on the Overview tab
  3. Check the list of external IP addresses assigned
  4. Use search to find a particular IP if needed
  5. Copy an IP address with the copy button

Scenario 5: Deploying an Ingress Across Clusters

  1. Create the Ingress
  2. Create a PropagationPolicy:
    • Resource selector: name the Ingress
    • Target clusters: choose the clusters to deploy to
  3. Check the "Multi-Cluster Policies" tab in the detail panel
  4. Check the endpoint assigned on each cluster
  5. Bring them together with a global load balancer or DNS round robin

The Ingress Controller

The controller that actually acts on an Ingress resource:

ControllerWhat it is like
nginxThe most widely used, with rich features
traefikAutomatic configuration, Let's Encrypt integration
haproxyHigh performance, enterprise features
istioService mesh integration
kongAPI gateway features

Path Types

TypeDescriptionExample
PrefixMatches the path prefix/api matches both /api and /api/v1
ExactMatches the path exactly/api matches only /api
ImplementationSpecificDepends on the controllerSee the controller's documentation

TLS/SSL Configuration

To use HTTPS on an Ingress:

  1. Create the TLS Secret:

    kubectl create secret tls my-tls-secret \
    --cert=path/to/cert.crt \
    --key=path/to/cert.key \
    -n namespace
  2. Set TLS on the Ingress:

    spec:
    tls:
    - hosts:
    - example.com
    secretName: my-tls-secret
  3. Automatic certificate management (cert-manager):

    annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod

Ingress Annotations

The main annotations of the nginx Ingress controller:

AnnotationDescription
nginx.ingress.kubernetes.io/rewrite-targetRewrites the URL
nginx.ingress.kubernetes.io/ssl-redirectRedirects to HTTPS
nginx.ingress.kubernetes.io/proxy-body-sizeLimits the request body size
nginx.ingress.kubernetes.io/proxy-connect-timeoutThe connect timeout
nginx.ingress.kubernetes.io/affinitySession affinity

Managing Ingresses Across Clusters

When deploying an Ingress to several clusters through MCM:

PropagationPolicy:

  • Copies the same Ingress to several clusters
  • Chooses the clusters and sets the deployment strategy

OverridePolicy:

  • Applies different Ingress settings per cluster
  • For example, a different certificate per cluster

The multi-cluster Ingress pattern:

  • Deploy the same Ingress to each cluster
  • Spread traffic between clusters with a global load balancer
  • Route by region with DNS

Resolving Problems

When the Ingress does not work:

  • Check an Ingress controller is installed
  • Check the ingressClassName is right
  • Check the backend Service exists and is working
  • Check the Service's port is right

When TLS does not work:

  • Check the TLS Secret exists
  • Check the Secret's type is kubernetes.io/tls
  • Check the certificate's hostname matches the Ingress host
  • Check the certificate has not expired

When it cannot be reached from outside:

  • Check the Ingress controller Service is of the LoadBalancer type
  • Check an external IP has been assigned
  • Check the firewall rules
  • Check the DNS settings

Next Steps