Ingress Controller
Definition
An Ingress Controller is a specialized load balancer for Kubernetes environments that manages external access to services within a cluster, typically via HTTP/HTTPS. It interprets Ingress resources, which define rules for routing external HTTP/S traffic to internal services. Ingress Controllers can provide additional features such as SSL termination, path-based routing, and virtual host-based routing, enhancing the security and efficiency of traffic management in Kubernetes.
Secure Settings Example
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: secure-ingress
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/secure-backends: "true"
spec:
tls:
- hosts:
- example.com
secretName: tls-secret
rules:
- host: example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: my-service
port:
number: 80
Insecure Settings Example
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: insecure-ingress
spec:
rules:
- host: example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: my-service
port:
number: 80