Skip to content

Commit ebe8f93

Browse files
committed
Add ingress class example
1 parent d56faca commit ebe8f93

File tree

1 file changed

+51
-4
lines changed

1 file changed

+51
-4
lines changed

docs/guide/ingress/ingress_class.md

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,41 @@ You can use IngressClassParams to enforce settings for a set of Ingresses.
165165
spec:
166166
targetType: ip
167167
```
168+
- with IPv4IPAMPoolId
169+
```
170+
apiVersion: elbv2.k8s.aws/v1beta1
171+
kind: IngressClassParams
172+
metadata:
173+
name: class2048-config
174+
spec:
175+
ipamConfiguration:
176+
ipv4IPAMPoolId: ipam-pool-000000000
177+
```
178+
- with PrefixListsIDs
179+
```
180+
apiVersion: elbv2.k8s.aws/v1beta1
181+
kind: IngressClassParams
182+
metadata:
183+
name: class2048-config
184+
spec:
185+
prefixListsIDs:
186+
- pl-00000000
187+
- pl-11111111
188+
```
189+
- with listeners
190+
```
191+
apiVersion: elbv2.k8s.aws/v1beta1
192+
kind: IngressClassParams
193+
metadata:
194+
name: class2048-config
195+
spec:
196+
listeners:
197+
- protocol: HTTPS
198+
port: 443
199+
listenerAttributes:
200+
- key: routing.http.response.server.enabled
201+
value: "false"
202+
```
168203

169204
### IngressClassParams specification
170205

@@ -275,11 +310,14 @@ They may specify `capacityUnits`. If the field is specified, LBC will ignore the
275310

276311
If `capacityUnits` is specified, it must be to valid positive value greater than 0. If set to 0, the LBC will reset the capacity reservation for the load balancer.
277312

278-
#### spec.ipv4IPAMPoolId
313+
#### spec.ipamConfiguration
279314

280-
The IPAM pool you choose will be the preferred source of public IPv4 addresses.
281-
If the pool is depleted, IPv4 addresses will be assigned by AWS.
282-
To remove the IPAM pool from your ALB, remove `spec.ipv4IPAMPoolId` from the IngressClass definition.
315+
`ipamConfiguration` is an optional setting.
316+
317+
Cluster administrators can use `ipamConfiguration` field to specify the IPv4 IPAM Pool ID which will be used by your load balancer to assign IP addresses.
318+
319+
1. If `ipamConfiguration` is set. The `ipv4IPAMPoolId` you choose will be the preferred source of public IPv4 addresses. If the pool is depleted, IPv4 addresses will be assigned by AWS. To remove the IPAM pool from your ALB, remove `spec.ipamConfiguration` from the IngressClass definition.
320+
2. If `ipamConfiguration` un-specified, Ingresses with this IngressClass can continue to use `alb.ingress.kubernetes.io/ipam-ipv4-pool-id` annotation specify the IPv4 IPAM Pool ID.
283321

284322
#### spec.PrefixListsIDs
285323

@@ -289,3 +327,12 @@ Cluster administrators can use `PrefixListsIDs` field to specify the managed pre
289327

290328
1. If `PrefixListsIDs` is set, the prefix lists defined will be applied to the load balancer that belong to this IngressClass. If you specify invalid prefix list IDs, the controller will fail to reconcile ingresses belonging to the particular ingress class.
291329
2. If `PrefixListsIDs` un-specified, Ingresses with this IngressClass can continue to use `alb.ingress.kubernetes.io/security-group-prefix-lists` annotation to specify the load balancer prefix lists.
330+
331+
#### spec.listeners
332+
333+
`listeners` is an optional setting.
334+
335+
Cluster administrators can use `Listeners` field to specify the [Listener Attributes](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#listener-attributes) for multiple load balancer listeners associated with this IngressClass. For each listener entry in the list, the desired attributes and their values are specified in the `listenerAttributes` field. Each listener is uniquely identified by its `port` and `protocol` fields, which determine which listener the attributes should be applied to.
336+
337+
1. If `listeners` is set, the defined attributes will be applied to the corresponding load balancer listeners based on port and protocol matching. Note that using invalid keys or values will cause the controller to fail when reconciling ingresses in this IngressClass.
338+
2. If `Listeners` un-specified, Ingresses with this IngressClass can continue to use `alb.ingress.kubernetes.io/listener-attributes.${Protocol}-{Port}` annotation to specify the listener attributes.

0 commit comments

Comments
 (0)