Ingress specification¶
This document covers how ingress resources work in relation to The AWS Load Balancer Controller.
An example ingress for Kubernetes Version 1.18 and below, from example is as follows.
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: "2048-ingress"
namespace: "2048-game"
annotations:
kubernetes.io/ingress.class: alb
labels:
app: 2048-nginx-ingress
spec:
rules:
- host: 2048.example.com
http:
paths:
- path: /*
backend:
serviceName: "service-2048"
servicePort: 80
An example ingress for Kubernetes Version 1.19 and above, from example is as follows.
apiVersion: extensions/v1
kind: Ingress
metadata:
name: "2048-ingress"
namespace: "2048-game"
annotations:
kubernetes.io/ingress.class: alb
labels:
app: 2048-nginx-ingress
spec:
rules:
- host: 2048.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: service-2048
port:
number: 80
The host field specifies the eventual Route 53-managed domain that will route to this service.
The service, service-2048, must be of type NodePort in order for the provisioned ALB to route to it.(see echoserver-service.yaml)
For details on purpose of annotations seen above, see Annotations.