Create a Kubernetes Ingress

A Kubernetes Ingress specifies a set of rules that route requests that match a particular <domain>/{path} to a given application. Ingresses are scoped to a single namespace and thus can route requests only to the applications inside that namespace.

  1. Log in to the MKE web UI.

  2. Navigate to Kubernetes > Ingresses and click Create.

  3. In the Create Ingress Object page, enter an ingress name and the following rule details:

    • Host (optional)

    • Path

    • Path type

    • Service name

    • Port number

    • Port name

  4. Generate the configuration file by clicking Generate YAML.

  5. Select a namespace using the Namespace dropdown.

  6. Click Create.

Example Kubernetes Ingress configuration file
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
  name: echo
spec:
  ingressClassName: nginx-default
  rules:
    - host: example.com
      http:
        paths:
          - path: /echo
            pathType: Exact
            backend:
              service:
                name: echo-service
                port:
                  number: 80

See also