@@ -141,6 +141,27 @@ will be used, otherwise use the set value.
141141 * ` timeout ` Required. Specifies the health check timeout duration in the unit of second.
142142 The value ranges from ` 1 ` to ` 50 ` . Defaults to ` 3 ` .
143143
144+ * ` kubernetes.io/elb.enable-transparent-client-ip ` Optional. Specifies whether to pass source IP addresses of the clients to backend servers.
145+ Valid values are ` 'true' ` and ` 'false' ` .
146+
147+ TCP or UDP listeners of shared load balancers:
148+ The value can be ** true** or ** false** , and the default value is ** false** if this annotation is not passed.
149+
150+ HTTP or HTTPS listeners of shared load balancers:
151+ The value can only be ** true** , and the default value is ** true** if this annotation is not passed.
152+
153+ All listeners of dedicated load balancers:
154+ The value can only be ** true** , and the default value is ** true** if this annotation is not passed.
155+
156+ > Note:
157+ >
158+ > If this function is enabled, the load balancer communicates with backend servers using their real IP addresses.
159+ > Ensure that security group rules and access control policies are correctly configured.
160+ >
161+ > If this function is enabled, a server cannot serve as both a backend server and a client.
162+ >
163+ > If this function is enabled, backend server specifications cannot be changed.
164+
144165* ` kubernetes.io/elb.x-forwarded-host ` Optional. Specifies whether to rewrite the ` X-Forwarded-Host ` header.
145166 If this function is enabled, ` X-Forwarded-Host ` is rewritten based on Host in the request and sent to backend servers.
146167 Valid values are ` 'true' ` and ` 'false' ` , defaults to ` 'false' ` .
@@ -216,7 +237,7 @@ kind: Service
216237metadata:
217238 annotations:
218239 kubernetes.io/elb.class: shared
219- kubernetes.io/elb.id: xxxx # Please fill your ELB service ID.
240+ kubernetes.io/elb.id: xx # Please replace xx with your ELB instance ID.
220241 kubernetes.io/elb.lb-algorithm: ROUND_ROBIN
221242 labels:
222243 app: nginx
@@ -263,6 +284,7 @@ metadata:
263284 annotations:
264285 kubernetes.io/elb.class: shared
265286 kubernetes.io/elb.lb-algorithm: ROUND_ROBIN
287+ kubernetes.io/elb.enable-transparent-client-ip: 'true' # Preserve client IP to backend servers.
266288 labels:
267289 app: nginx
268290 name: loadbalancer-service-demo-02
0 commit comments