ALB Frontend
We define a resource called frontend (abbreviated as ft), which is used to declare all the ports that all the alb should listen to.
apiVersion: crd.alauda.io/v1
kind: Frontend
metadata:
labels:
alb2.cpaas.io/name: alb-demo # required, indicate the ALB instance to which this Frontend belongs to
name: alb-demo-00080 # format as $alb_name-$port
spec:
backendProtocol: "http"
certificate_name: "" # format as $secret_ns/$secret_name
port: 80
protocol: http # protocol of this Frontend itself. http|https|grpc|grpcs for l7 proxy. tcp|udp for l4 proxy
serviceGroup: # could be multiple services.
services:
- name: hello-world
namespace: default
port: 80
weight: 100
As L4 proxy
For l4 proxy, serviceGroup is required.
As L7 proxy
For l7 proxy, serviceGroup is optional. When a request arrives, ALB will first try to match it against rules associated with this Frontend. Only if the request doesn't match any rule, ALB will then forward it to the default serviceGroup specified in the Frontend configuration.