Middle
What does Ingress do in Kubernetes?
sobes.tech AI
Answer from AI
Ingress in Kubernetes is an object that manages external access to services within a cluster, usually via HTTP/HTTPS.
Ingress allows:
- Defining routing rules for requests based on URL or host to different services.
- Configuring SSL termination (TLS).
- Providing load balancing.
To operate Ingress, an Ingress Controller is required — a component that implements these rules and handles incoming traffic.
Example of a simple Ingress:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
spec:
rules:
- host: example.com
http:
paths:
- path: /app1
pathType: Prefix
backend:
service:
name: app1-service
port:
number: 80
- path: /app2
pathType: Prefix
backend:
service:
name: app2-service
port:
number: 80
Thus, Ingress simplifies access management and routing in Kubernetes.