Ingress Helper

Create standalone networking.k8s.io/v1 Ingress resources using the ohMyHelm ingress helper, including TLS, multi-host routing, and annotations.

Ingress Helper

With the root helper ingress, you can create one or more standalone Kubernetes Ingress resources (networking.k8s.io/v1 on all modern clusters) — independently of Chart mode, for example for existing Services or third-party charts.

Supported Fields

According to values.schema.json, each entry in ingress[] accepts the following fields (additionalProperties: false):

Field Required Description
name Yes Name of the Ingress resource (metadata.name)
namespace Optional Present in the schema, but currently ignored (see note below)
annotations Optional Map of Ingress controller and cert-manager annotations
tls Optional List of { secretName, hosts: [...] }
hosts Yes List of networking.k8s.io/v1 Ingress rules (rendered directly under spec.rules)

Example 1: Basic Ingress (networking.k8s.io/v1)

For all clusters running Kubernetes 1.19 and later, exclusively use the networking.k8s.io/v1 syntax with pathType and backend.service.name / backend.service.port:

ingress:
  - name: acme-web-ingress
    hosts:
      - host: app.acme.example
        http:
          paths:
            - path: /
              pathType: Prefix
              backend:
                service:
                  name: acme-web
                  port:
                    name: http

Example 2: Ingress with TLS and cert-manager Annotation

ingress:
  - name: acme-api-ingress
    annotations:
      cert-manager.io/cluster-issuer: letsencrypt-prod
      nginx.ingress.kubernetes.io/proxy-body-size: "20m"
    tls:
      - secretName: acme-api-tls
        hosts:
          - api.acme.example
    hosts:
      - host: api.acme.example
        http:
          paths:
            - path: /
              pathType: Prefix
              backend:
                service:
                  name: acme-api
                  port:
                    number: 8080

Example 3: Path-Based Routing to Multiple Services

ingress:
  - name: acme-portal-ingress
    annotations:
      cert-manager.io/cluster-issuer: letsencrypt-prod
    tls:
      - secretName: acme-portal-tls
        hosts:
          - portal.acme.example
    hosts:
      - host: portal.acme.example
        http:
          paths:
            - path: /api
              pathType: Prefix
              backend:
                service:
                  name: acme-api
                  port:
                    name: http
            - path: /
              pathType: Prefix
              backend:
                service:
                  name: acme-frontend
                  port:
                    name: http

Example 4: Multiple Hosts and Multiple Ingress Resources

ingress:
  - name: acme-public-ingress
    tls:
      - secretName: acme-public-tls
        hosts:
          - www.acme.example
          - docs.acme.example
    hosts:
      - host: www.acme.example
        http:
          paths:
            - path: /
              pathType: Prefix
              backend:
                service:
                  name: acme-website
                  port:
                    name: http
      - host: docs.acme.example
        http:
          paths:
            - path: /
              pathType: Prefix
              backend:
                service:
                  name: acme-docs
                  port:
                    name: http

  - name: acme-admin-ingress
    annotations:
      nginx.ingress.kubernetes.io/whitelist-source-range: "10.0.0.0/8"
    hosts:
      - host: admin.acme.example
        http:
          paths:
            - path: /
              pathType: Prefix
              backend:
                service:
                  name: acme-admin
                  port:
                    name: http

Gateway API (HTTPRoute) and ingressClassName

If you want to set spec.ingressClassName explicitly or use modern Gateway API resources (gateway.networking.k8s.io/v1/HTTPRoute), use the manifests helper.

Related Pages