- Home
- Operations Guide
- Deploy applications with Kubernetes
- NGINX Ingress Controller
- Create a Kubernetes Ingress
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.
-
Log in to the MKE web UI.
-
Navigate to Kubernetes > Ingresses and click Create.
-
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
-
Generate the configuration file by clicking Generate YAML.
-
Select a namespace using the Namespace dropdown.
-
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
-
Kubernetes Ingress in the Kubernetes documentation