Gateway API configuration reference

Updated at:

Look up the field definitions for each Application Load Balancer (ALB) Gateway API resource in Container Service for Kubernetes (ACK) clusters: GatewayClass, Gateway, HTTPRoute, AlbInstance, AlbRule, and AlbServerGroup.

GatewayClass fields

GatewayClass

Field

Type

Description

apiVersion

Fixed value

The versioned schema of the object. Valid value: gateway.networking.k8s.io/v1.

kind

Fixed value

The REST resource represented by the object. Valid value: GatewayClass.

metadata

ObjectMeta

The metadata of the standard object.

spec

GatewayClassSpec

The desired state of the GatewayClass.

status

GatewayClassStatus

The current status of the GatewayClass, which is written by the controller.

Important

This field cannot be modified.

GatewayClassSpec

Field

Type

Description

controllerName

string

The name of the controller that manages the Gateway. Do not modify this field.

  • gateways.alibabacloud.com/alb/v1 manages ALB Standard Edition instances.

  • gateways.alibabacloud.com/alb-extensible/v1 manages ALB Extended Edition instances.

Important

This field cannot be modified.

Gateway fields

Gateway

Field

Type

Description

apiVersion

Fixed value

The versioned schema of the object. Valid value: gateway.networking.k8s.io/v1.

kind

Fixed value

The REST resource represented by the object. Valid value: Gateway.

metadata

ObjectMeta

The metadata of the standard object.

spec

GatewaySpec

The desired state of the Gateway.

status

GatewayStatus

The current status of the Gateway, which is written by the controller.

Important

This field cannot be modified.

GatewaySpec

Field

Type

Description

gatewayClassName

string

The name of the GatewayClass used by the Gateway.

  • alb

    After you install Gateway API, the ALB Ingress Controller automatically creates this GatewayClass.
  • alb-extensible

    After you install ALB Ingress Controller (v3.0 or later), the controller automatically creates this GatewayClass.

infrastructure

GatewayInfrastructure

The infrastructure-level configuration of the Gateway. Use this field to reference an AlbInstance with parametersRef.

listeners

Listener

The list of Gateway Listener configurations. Each Listener in the same Gateway must have a unique combination of port, protocol, and hostname.

GatewayInfrastructure

Field

Type

Description

parametersRef

LocalParametersReference

References a parameter resource in the namespace of the current Gateway. Only AlbInstance can be referenced.

LocalParametersReference

Field

Type

Description

group

string

The API group to which the referenced resource belongs. When an AlbInstance is referenced, this field must be set to alibabacloud.com.

kind

string

The type of the referenced resource. Only AlbInstance is supported.

name

string

The name of the referenced AlbInstance. The AlbInstance must reside in the same namespace as the Gateway.

AlbInstance

Field

Type

Description

apiVersion

Fixed value

The versioned schema of the object. Valid value: alibabacloud.com/v1.

kind

Fixed value

The REST resource represented by the object. Valid value: AlbInstance.

metadata

ObjectMeta

The metadata of the standard object. An AlbInstance is a namespace-level resource and must reside in the same namespace as the Gateway that references it.

spec

AlbInstanceSpec

The configurations of the ALB instance.

AlbInstanceSpec

Field

Type

Description

config

AlbInstanceSpecConfig

The configurations of the ALB instance.

listeners

AlbInstanceListener

The listener configurations. Each entry is matched with a listener in spec.listeners of the Gateway by protocol and port. Entries that do not match a Gateway Listener are ignored. Duplicate entries that use the same protocol and port are not allowed in the same AlbInstance.

AlbInstanceSpecConfig

Field

Type

Description

name

string

The name of the ALB instance.

Default value: a name that is automatically generated in the k8s-{namespace}-{name}-{uid_hash_prefix} format, where:

  • k8s: a fixed prefix.

  • {namespace}: the namespace name of the Gateway object with all non-alphanumeric characters (such as - and _) removed.

  • {name}: the name of the Gateway object with all non-alphanumeric characters (such as - and _) removed.

  • {uid_hash_prefix}: the first 10 hexadecimal characters of the SHA-256 hash of the UID (metadata.uid) of the Gateway object.

addressType

enum

The type of the IPv4 address of the ALB instance.

  • Internet: the ALB instance has a public IP address. The domain name resolves to the public IP address, and the instance can be accessed over the Internet.

  • Intranet: the ALB instance has only an internal IP address. The domain name resolves to the internal IP address, and the instance can be accessed only from within its virtual private cloud (VPC).

Default value: Internet.

Important

This field takes effect only when you create an ALB instance. You cannot use it to change the network type of an existing ALB instance.

ipv6AddressType

enum

The type of the IPv6 address of the ALB instance.

This field takes effect only when addressIpVersion is set to DualStack. The access type of IPv4 addresses is still determined by addressType.
  • Internet: the ALB instance uses a public IPv6 address. The domain name resolves to the public IPv6 address, and the instance can be accessed over the public IPv6 network.

  • Intranet: the ALB instance uses an internal IPv6 address. The domain name resolves to the internal IPv6 address, and the instance can be accessed over IPv6 only from within its VPC.

Default value: Intranet.

Important

This field takes effect only when you create an ALB instance. You cannot use it to change the network type of an existing ALB instance.

addressIpVersion

enum

The IP version.

  • IPv4: IPv4 addresses only.

  • DualStack: both IPv4 and IPv6 addresses.

Default value: IPv4.

resourceGroupId

string

The ID of the resource group.

zoneMappings

ZoneMapping

The zone and elastic IP address (EIP) configurations.

Important

This field takes effect only when you create an ALB instance. You cannot use it to change the zones or the EIPs of an existing ALB instance.

accessLogConfig

AccessLogConfig

The access log configurations.

billingConfig

BillingConfig

The billing configurations.

Important

You can use this field only to associate or change an EIP bandwidth plan. You cannot use it to disassociate an EIP bandwidth plan.

tags

Tag

The tags of the instance.

ZoneMapping

Field

Type

Description

vSwitchId

string

The ID of the vSwitch.

Default value: the first vSwitch in each zone that ALB supports in the VPC of the current cluster. This default applies only if you leave zoneMappings empty.

Important

This field takes effect only when you create an ALB instance. You cannot use it to change the zones or the EIPs of an existing ALB instance.

zoneId

string

The zone of the vSwitch.

This field is optional. The controller automatically queries the zone ID of the vSwitch.

allocationId

string

The ID of the EIP.

Important

This field takes effect only when you create an ALB instance. You cannot use it to change the zones or the EIPs of an existing ALB instance.

eipType

string

The type of the EIP.

This field is optional. The controller automatically queries the type of the EIP.

AccessLogConfig

Field

Type

Description

logProject

string

The name of the Simple Log Service (SLS) project.

logStore

string

The name of the Logstore. The name must start with alb_. If the Logstore does not exist, it is automatically created.

BillingConfig

Field

Type

Description

bandWidthPackageId

string

The ID of the bound EIP bandwidth plan.

Important

You can use this field only to associate or change an EIP bandwidth plan. You cannot use it to disassociate an EIP bandwidth plan.

Tag

Field

Type

Description

key

string

The tag key.

value

string

The tag value.

AlbInstanceListener

Field

Type

Description

protocol

enum

This field is required. The protocol of the Listener, which must match the protocol of the Gateway Listener. This field is case-insensitive. Valid values: HTTP and HTTPS.

port

int

This field is required. The port of the Listener, which must match the port of the Gateway Listener.

description

string

The description of the Listener. The description must be 2 to 256 characters in length and can contain Chinese characters, letters, digits, underscores (_), and .,;/@-.

Default value: gateway-auto-listener-{port}-{protocol}.

idleTimeout

int

The idle connection timeout period. Unit: seconds. Valid values: [1, 600].

Default value: 15.

To set a value greater than 600 seconds, submit a ticket to apply for a quota increase.

requestTimeout

int

The request timeout period. Unit: seconds. Valid values: [1, 600]. If ALB does not receive a response from the backend server within this period, ALB returns the HTTP 504 status code.

Default value: 60.

To set a value greater than 600 seconds, submit a ticket to apply for a quota increase.

gzipEnabled

boolean

Specifies whether to enable Gzip compression.

Default value: true.

securityPolicyId

string

The ID of the TLS security policy. This field takes effect only on HTTPS listeners. Both system security policies and custom security policies are supported.

Default value: tls_cipher_policy_1_0 for ALB Standard Edition instances, and tls_cipher_policy_1_0_to_1_3 for ALB Extended Edition instances.

Important

ALB Extended Edition instances support only tls_cipher_policy_1_0_to_1_3. If you configure another security policy, the listener fails to be created or updated.

caEnabled

boolean

Specifies whether to enable HTTPS mutual authentication. This field takes effect only on HTTPS listeners.

Default value: false.

Important

Only ALB Standard Edition instances support this field. ALB Extended Edition instances do not support mutual authentication.

caCertificates

AlbInstanceCertificate

The CA certificates used for mutual authentication. This field takes effect only on HTTPS listeners. Specify the certificates as a complete list. If you add, remove, or change a certificate ID in the list, the change is synchronized to the ALB listener.

certificates

AlbInstanceCertificate

The certificates in Certificate Management Service, used as additional certificates of the HTTPS listener. If the Gateway does not reference a Secret certificate in tls.certificateRefs, the first certificate is used as the default certificate.

xForwardedForConfig

AlbInstanceXForwardedForConfig

The X-Forwarded-For header configurations.

logConfig

LogConfig

The configurations for recording custom headers in access logs and for tracing.

Important

Only ALB Standard Edition instances support this field. ALB Extended Edition instances do not support this field.

tags

Tag

The tags of the Listener. Specify the tags as a complete list. Custom tags that are not in the list, including tags that are manually added in the ALB console, are removed from the Listener.

AlbInstanceCertificate

Field

Type

Description

certificateId

string

This field is required. The ID of the certificate in Certificate Management Service. The value cannot be empty.

AlbInstanceXForwardedForConfig

Field

Type

Description

xForwardedForProcessingMode

enum

The mode used by ALB to process the X-Forwarded-For header. This field takes precedence over xForwardedForEnabled.

  • append: appends the client IP address.

  • remove: removes the header.

  • preserve: retains the original value without modification.

Default value: append for a new listener. For an existing listener, the current configuration on ALB is retained.

xForwardedForEnabled

boolean

Specifies whether to enable the X-Forwarded-For header. Use xForwardedForProcessingMode instead.

xForwardedForProtoEnabled

boolean

Specifies whether to use the X-Forwarded-Proto header to obtain the listener protocol of ALB.

Default value: false.

xForwardedForHostEnabled

boolean

Specifies whether to use the X-Forwarded-Host header to obtain the domain name accessed by the client.

Default value: false.

xForwardedForSLBIdEnabled

boolean

Specifies whether to use the SLB-ID header to obtain the ID of the ALB instance.

Default value: false.

xForwardedForSLBPortEnabled

boolean

Specifies whether to use the X-Forwarded-Port header to obtain the listener port of ALB.

Default value: false.

xForwardedForClientSrcPortEnabled

boolean

Specifies whether to use the X-Forwarded-Client-srcport header to obtain the port of the client.

Default value: false.

xForwardedForClientSourceIpsEnabled

boolean

Specifies whether to allow ALB to obtain the real client IP address from the X-Forwarded-For header. If you enable this feature, you must also configure xForwardedForClientSourceIpsTrusted.

Default value: false.

xForwardedForClientSourceIpsTrusted

string

The trusted proxy IP addresses or CIDR blocks. IPv4 addresses, IPv6 addresses, and CIDR blocks are supported. Separate multiple values with semicolons (;) and do not add spaces. This field takes effect only when xForwardedForClientSourceIpsEnabled is true.

  • Set the value to 0.0.0.0/0 to use the leftmost address in the X-Forwarded-For header as the real client IP address.

  • Set the value to a list of proxy IP addresses to use the first address from the right that is not in the list as the real client IP address.

Example: 192.168.x.x;192.168.x.x/16.

xForwardedForClientCertSubjectDNEnabled

boolean

Specifies whether to use the X-Forwarded-Clientcert-subjectdn header to obtain the subject information of the client certificate. This field takes effect only on HTTPS listeners that use mutual authentication.

Default value: false.

xForwardedForClientCertSubjectDNAlias

string

The name of the custom header that carries the subject information of the client certificate. This field takes effect only when xForwardedForClientCertSubjectDNEnabled is true.

xForwardedForClientCertIssuerDNEnabled

boolean

Specifies whether to use the X-Forwarded-Clientcert-issuerdn header to obtain the issuer information of the client certificate. This field takes effect only on HTTPS listeners that use mutual authentication.

Default value: false.

xForwardedForClientCertIssuerDNAlias

string

The name of the custom header that carries the issuer information of the client certificate. This field takes effect only when xForwardedForClientCertIssuerDNEnabled is true.

xForwardedForClientCertFingerprintEnabled

boolean

Specifies whether to use the X-Forwarded-Clientcert-fingerprint header to obtain the fingerprint of the client certificate. This field takes effect only on HTTPS listeners that use mutual authentication.

Default value: false.

xForwardedForClientCertFingerprintAlias

string

The name of the custom header that carries the fingerprint of the client certificate. This field takes effect only when xForwardedForClientCertFingerprintEnabled is true.

xForwardedForClientCertClientVerifyEnabled

boolean

Specifies whether to use the X-Forwarded-Clientcert-clientverify header to obtain the verification result of the client certificate. This field takes effect only on HTTPS listeners that use mutual authentication.

Default value: false.

xForwardedForClientCertClientVerifyAlias

string

The name of the custom header that carries the verification result of the client certificate. This field takes effect only when xForwardedForClientCertClientVerifyEnabled is true.

The four custom header names (*Alias) in this table must be 1 to 40 characters in length. They can contain only lowercase letters, digits, hyphens (-), and underscores (_). They cannot conflict with the following reserved headers: slb-id, slb-ip, x-forwarded-for, x-forwarded-proto, x-forwarded-eip, x-forwarded-port, x-forwarded-client-srcport, x-forwarded-host, connection, upgrade, content-length, transfer-encoding, keep-alive, te, expect, host, cookie, and remoteip.

LogConfig

Field

Type

Description

accessLogRecordCustomizedHeadersEnabled

boolean

Specifies whether to record custom headers in the access logs of the ALB instance.

Default value: false.

accessLogTracingConfig

AccessLogTracingConfig

The Tracing Analysis (Xtrace) configuration.

AccessLogTracingConfig

Field

Type

Description

tracingEnabled

boolean

Specifies whether to enable Xtrace.

Default value: false.

tracingType

enum

The sampling algorithm for tracing. This field is required when tracingEnabled is true. Valid values: Zipkin and OpenTelemetry.

tracingSample

int

The sampling rate of tracing. Unit: 0.01%. Valid values: [1, 10000]. This field is required when tracingEnabled is true.

Listener

Field

Type

Description

name

string

The name of the Listener. The name must be unique within the same Gateway.

hostname

string

The hostname to match. If you leave this field empty, all hostnames are matched.

port

int

The port of the Listener.

protocol

enum

The protocol of the Listener.

  • HTTP

  • HTTPS

tls

GatewayTLSConfig

The TLS configuration of the Listener. When protocol is set to HTTPS, this field is required. If protocol is set to HTTP, do not specify this field. Otherwise, the Gateway resource fails to be created.

allowedRoutes

AllowedRoutes

The kinds of Routes that can be attached to this Listener and the namespaces that these Routes can come from.

Default value: {namespaces: {from: Same}}, which indicates that Routes from the same namespace can be attached to this Listener.

GatewayTLSConfig

Field

Type

Description

mode

enum

The TLS processing mode.

Only Terminate is supported. In this mode, the Gateway terminates the TLS session between the downstream client and the Gateway.

certificateRefs

SecretObjectReference

One or more references to Kubernetes Secrets.

When multiple certificates exist, the first certificate is selected as the default certificate when the Listener is created. The default certificate is not changed during subsequent Listener updates unless necessary.

Important

If certificateRefs references a resource in another namespace, the reference takes effect only if a ReferenceGrant exists in the destination namespace and explicitly allows the certificate to be referenced.

SecretObjectReference

Field

Type

Description

group

string

The API group to which the referenced object belongs. When a Secret is referenced, this field is usually omitted or set to an empty string.

kind

string

The type of the referenced object. Certificate references support only Secret.

name

string

The name of the referenced Secret.

namespace

string

The namespace in which the referenced Secret resides. If this field is not specified, the namespace of the Gateway resource is used by default. For a cross-namespace reference, a ReferenceGrant that allows the reference is required in the destination namespace.

AllowedRoutes

Field

Type

Description

namespaces

RouteNamespaces

Specifies the namespaces from which Routes can be attached to this Listener. By default, only Routes in the namespace of the current Gateway are allowed.

kinds

RouteGroupKind

Specifies the Group/Kind of Routes that can be attached to this Listener. If you leave this field empty, the allowed Route kinds are determined by the protocol of the Listener.

RouteNamespaces

Field

Type

Description

from

enum

The scope of namespaces from which Routes can be selected.

  • All: Routes in all namespaces can be attached to this Gateway Listener.

  • Selector: only Routes in namespaces selected by the selector can be attached to this Gateway Listener.

  • Same: only Routes in the same namespace as the Gateway can be attached to this Gateway Listener.

Default value: Same.

selector

LabelSelector

When from is set to Selector, this field is required. Only Routes in namespaces whose labels match this selector can be attached to the Listener. For other from values, this field is ignored.

RouteGroupKind

Field

Type

Description

group

string

The API group to which the Route belongs.

Default value: gateway.networking.k8s.io.

kind

string

The type of the Route resource. Only HTTPRoute is supported.

HTTPRoute fields

HTTPRoute

Field

Type

Description

apiVersion

Fixed value

The versioned schema of the object. Valid value: gateway.networking.k8s.io/v1.

kind

Fixed value

The REST resource represented by the object. Valid value: HTTPRoute.

metadata

ObjectMeta

The metadata of the standard object.

spec

HTTPRouteSpec

The desired state of the HTTPRoute.

status

HTTPRouteStatus

The current status of the HTTPRoute, which is written by the controller.

Important

This field cannot be modified.

HTTPRouteSpec

Field

Type

Description

parentRefs

ParentReference

An array of parent resources, usually Gateways, that this Route is attached to.

Important

The AllowedRoutes field of the Gateway must allow the kind and namespace of this Route.

hostnames

string[]

The hostnames used to select the specific HTTPRoute that processes a request based on the Host header of the HTTP request.

rules

HTTPRouteRule

An array of rules, each defining a set of HTTP match conditions, filters, and forwarding actions. Each rule matches HTTP requests based on conditions (matches), processes the requests (filters), and forwards them to an API object (backendRefs).

By default, a PathPrefix / match rule is included. alb-extensible does not support this default prefix match, so an Extended Edition Route must explicitly specify Exact or RegularExpression.

ParentReference

Field

Type

Description

group

string

The API group to which the referenced object belongs.

Default value: gateway.networking.k8s.io.

kind

string

The resource type of the referenced object. Parent references support only Gateway.

namespace

string

The namespace in which the referenced object resides.

Default value: the namespace in which the current Route resource resides.

When a ParentReference points to a Gateway in another namespace, the corresponding Listener of the target Gateway must use allowedRoutes.namespaces to allow the namespace in which the Route resides.

By default, only Routes in the same namespace as the Gateway are allowed. Configure from: All or from: Selector to allow cross-namespace bindings. ReferenceGrant is not required in this scenario.

name

string

The name of the referenced object.

sectionName

string

The name of a section within the target resource. For a Gateway, this is the Listener name.

HTTPRouteRule

Field

Type

Description

name

string

The name of the route rule. If this field is set, its value must be unique within the same HTTPRoute.

matches

HTTPRouteMatch

The conditions used to match this rule against inbound HTTP requests.

Default value: [{"path":{"type":"PathPrefix","value":"/"}}]

Multiple match blocks are evaluated with a logical OR, and the conditions within the same match block are evaluated with a logical AND.

filters

HTTPRouteFilter

The filters applied to requests that match this rule.

backendRefs

HTTPBackendRef

The backends to which requests are forwarded when the rule is matched.

HTTPRouteMatch

Field

Type

Description

Sub-fields

path

HTTPPathMatch

The HTTP request path match rule.

  • ALB Standard Edition instances support:

    • PathPrefix

    • Exact

    • RegularExpression

  • ALB Extended Edition instances support only Exact and RegularExpression. In addition, ALB Extended Edition instances support only one forwarding condition.

Default value for ALB Standard Edition instances: PathPrefix. ALB Extended Edition instances do not support this value. Explicitly specify Exact or RegularExpression.

  • type: the path match type. Default value: PathPrefix.

    • PathPrefix: prefix match.

    • Exact: exact match.

    • RegularExpression: regular expression match, which is case-insensitive.

  • value: a string.

    Default value: /.

headers

HTTPHeaderMatch[]

The HTTP header match rule. Multiple header conditions are evaluated with a logical AND. Only Exact is supported.

  • type: The match mode of the header value. Only Exact (exact match) is supported.

  • name: The name of the HTTP header to match. The name is case-insensitive.

  • value: the value of the HTTP header to match.

queryParams

HTTPQueryParamMatch[]

The HTTP query parameter match rule. Multiple query parameter conditions are evaluated with a logical AND. Only Exact is supported. ALB Extended Edition instances do not support this field.

  • type: The match mode of the query parameter value. Only Exact (exact match) is supported.

  • name: the name of the HTTP query parameter to match.

  • value: the value of the HTTP query parameter to match.

method

enum

The HTTP request method match rule.

ALB Extended Edition instances do not support this configuration.

Valid values:

  • GET

  • HEAD

  • POST

  • PUT

  • DELETE

  • OPTIONS

  • PATCH

None

HTTPRouteFilter

Field

Type

Description

Sub-fields

type

enum

The type of the filter. Valid values: RequestHeaderModifier, RequestRedirect, URLRewrite, ExtensionRef.

None

requestHeaderModifier

HTTPHeaderFilter

The request header modification configurations. This field takes effect only when type=RequestHeaderModifier.

  • set: Overwrites the specified request headers with the specified values before any other action is performed. Set the value to a list of header names and their values.

  • add: In ALB Gateway, add has the same effect as set. Set the value to a list of header names and their values.

  • remove: Deletes the specified request headers before any other action is performed. Set the value to a list of header names.

requestRedirect

HTTPRequestRedirectFilter

Returns an HTTP redirect response. This field takes effect only when type=RequestRedirect.

  • scheme: The protocol scheme in the redirect response. If this field is empty, the protocol of the original request is used. Valid values: http and https.

  • hostname: The hostname in the redirect response. If this field is empty, the hostname in the Host header of the original request is used.

  • path: The path in the redirect response. If you leave this field empty, the original request path is used.

  • path.type: Only ReplaceFullPath is supported.

  • path.replaceFullPath: The new path value used to replace the full request path in the redirect response.

  • port: The port number in the redirect response.

  • statusCode: The HTTP status code used in the redirect response. Valid values: 301 and 302.

urlRewrite

HTTPURLRewriteFilter

The rewrite configurations applied before a request is forwarded. This field takes effect only when type=URLRewrite.

  • hostname: Replaces the Host header in the request with the specified value during request forwarding.

  • path: The path rewrite rule. The request path is rewritten before the request is forwarded to the backend.

  • path.type: Only ReplaceFullPath is supported.

  • path.replaceFullPath: The new path value used to replace the full request path during a rewrite.

extensionRef

LocalObjectReference

The custom extension reference. Only an AlbRule in the same namespace can be referenced: group must be alibabacloud.com, and kind must be AlbRule.

  • group: The API group to which the referenced object belongs. Only alibabacloud.com is supported.

  • kind: The resource type of the referenced object. Only AlbRule is supported.

  • name: The name of the referenced object.

HTTPBackendRef

Field

Type

Description

group

string

The API group to which the referenced backend resource belongs. If this field is not specified or is an empty string, the Kubernetes core API group is used by default.

kind

string

The type of the referenced backend resource. Only Service is supported.

name

string

The name of the referenced backend resource.

namespace

string

The namespace in which the backend resource resides. If this field is not specified, the namespace of the current Route is used by default. A cross-namespace reference requires a ReferenceGrant that allows the reference in the destination namespace.

port

int

The destination port used to access the backend Service. This field is required when a Service is referenced.

weight

int

The forwarding weight of the backend. Default value: 1.

AlbRule fields

AlbRule

Field

Type

Description

apiVersion

Fixed value

The versioned schema of the object. Valid value: alibabacloud.com/v1.

kind

Fixed value

The REST resource represented by the object. Valid value: AlbRule.

metadata

ObjectMeta

The metadata of the standard object. An AlbRule is a namespace-level resource and must reside in the same namespace as the HTTPRoute that references it.

spec

AlbRuleSpec

The extended configurations of ALB forwarding rules.

AlbRuleSpec

Field

Type

Description

serviceExtensions

AlbServiceExtensionId

The service extension IDs associated with this AlbRule. ALB allows each forwarding rule to be associated with at most one service extension. This field is supported only by ALB Extended Edition instances.

AlbServiceExtensionId

Field

Type

Description

serviceExtensionId

string

The service extension ID, which is used to reference a specific service extension. If the list is empty, or if the serviceExtensionId of every entry is empty, the controller removes existing service extension associations.

AlbServerGroup fields

AlbServerGroup

Field

Type

Description

apiVersion

Fixed value

The versioned schema of the object. Valid value: alibabacloud.com/v1.

kind

Fixed value

The REST resource represented by the object. Valid value: AlbServerGroup.

metadata

ObjectMeta

The metadata of the standard object.

spec

AlbServerGroupSpec

The properties of the server group.

AlbServerGroupSpec

Field

Type

Description

targetRefs

AlbServerGroupTargetRef

Declares the Services to which the AlbServerGroup applies. The target Service must reside in the same namespace as the AlbServerGroup, and each Service can be associated with only one AlbServerGroup.

default

AlbServerGroupDefaultConfig

The default server group properties applied to all matched Services.

AlbServerGroupTargetRef

Field

Type

Description

group

string

The API group to which the target resource belongs. Leave this field empty or set it to an empty string, which indicates the Kubernetes core API group.

kind

string

The type of the target resource. Only Service is supported.

name

string

The name of the target Service.

AlbServerGroupDefaultConfig

Field

Type

Description

healthCheckConfig

AlbHealthCheckConfig

The health check configurations.

serviceExtensions

AlbServiceExtensionId

The list of associated service extension IDs. ALB allows each server group to be associated with at most one service extension. A configuration that associates more than one is rejected by ALB. This field is supported only by ALB Extended Edition instances.

AlbHealthCheckConfig

Field

Type

Description

healthCheckEnabled

boolean

Specifies whether to enable health checks.

Default value: false.

healthCheckProtocol

enum

The health check protocol.

  • ALB Standard Edition instances support:

    • HTTP

    • HTTPS

    • TCP

    • GRPC

  • ALB Extended Edition instances support:

    • HTTP

    • TCP

Default value: HTTP.

healthCheckMethod

enum

The HTTP method used for health checks.

  • GET

  • HEAD

Default value: HEAD.

healthCheckPath

string

The URL path used for health checks.

Default value: /.

healthCheckHost

string

The domain name used for health checks.

Default value: $SERVER_IP, which indicates that the IP address of the backend server is used.

healthCheckHttpVersion

enum

The HTTP version used for health checks.

  • ALB Standard Edition instances support:

    • HTTP1.0

    • HTTP1.1

  • ALB Extended Edition instances support:

    • HTTP1.1

Default value: HTTP1.1.

healthCheckInterval

int

The health check interval. Unit: seconds.

Valid values: [1, 50].

Default value: 2.

healthCheckTimeout

int

The health check timeout period. Unit: seconds.

Valid values: [1, 300].

Default value: 5.

healthCheckConnectPort

int

The port number used for health checks.

Valid values: [0, 65535].

Default value: 0, which indicates that the port of the backend server is used.

healthyThreshold

int

The number of consecutive successful health checks required before a backend server is declared healthy.

Valid values: [2, 10].

Default value: 3.

unhealthyThreshold

int

The number of consecutive failed health checks required before a backend server is declared unhealthy.

Valid values: [2, 10].

Default value: 3.

healthCheckCodes

string[]

The HTTP status codes used to determine health check results.

  • http_2xx

  • http_3xx

  • http_4xx

  • http_5xx

Default value: ["http_2xx"].