You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Afterward, wait for the external IP to become available:
@@ -218,15 +218,229 @@ The full set of configuration toggles can be found in the [`pkg/cloudscale_ccm/l
218
218
219
219
These annotations are all optional, as they come with reasonable defaults.
220
220
221
-
### Preserve Client Source IP
221
+
### External Traffic Policy: Local
222
222
223
-
By default, the source IP seen in the target container is not the original source IP of the client.
223
+
By default, Kubernetes adds an extra hop between load balancer and the pod that handles a packet. The load balancer sends packets to all nodes and the nodes implement balancing using NAT, adding an additional hop.
224
224
225
-
To change this, see the official Kubernetes documentation:
225
+
In some cases, the extra hop is undesireable or unnecessary. In this case, the external traffic policy can be set to local:
With this policy, the load balancer only sends traffic to nodes that have at least one of the necessary pods, and Kubernetes will only send traffic to the pods local to the node.
235
+
236
+
This is accomplished by an additional health monitor added by the CCM, which checks a `/livez` endpoint provided by the node. If the endpoint returns an HTTP 200, at least one targeted pod is available on the node.
237
+
238
+
### Client Source IP
239
+
240
+
Because traffic setup via CCM goes through our load balancers, you do not see the client source IP. To get access to the client's IP, you can configure your service to use the `proxy` or `proxyv2` protocol, which is supported by web servers like [NGINX](https://docs.nginx.com/nginx/admin-guide/load-balancer/using-proxy-protocol/).
See https://kubernetes.io/docs/reference/networking/service-protocols/#protocol-proxy-special
251
+
252
+
### Impact of Service Changes
253
+
254
+
The CCM reacts to service changes by changing the load balancer configuration.
255
+
256
+
Depending on the change, this can have a bigger or a smaller impact. While we try to be as efficient and non-disruptive as possible, we often have to apply generic actions to safely get to the desired state.
257
+
258
+
What follows is a list of changes that you might want to apply to an existing service, with a description of the expected impact.
259
+
260
+
You can get detailed information about each annotation here in the [`pkg/cloudscale_ccm/loadbalancer.go`](pkg/cloudscale/ccm/loadbalancer.go) file.
261
+
262
+
> :warning: We recommend using testing environments and maintenance windows to avoid surprises when changing configuration.
263
+
264
+
#### No Impact
265
+
266
+
The following annotations can be changed safely at any time, and should not impact any active or new connections:
Changes to the outward bound service port have a downtime ranging from 15s to 120s, depending on the action. Since the name of the port is used to avoid expensive pool recreation, the impact is minimal if the port name does not change.
295
+
296
+
For example, the following port 80 to port 8080 change should cause downtime of no more than 15s, as the implicit name of "" is not changed:
Same goes for this change, where the default name of "" is changed. This is the most surprising example and underscores why it is generally a good idea to plan some maintenance, even if the expected impact is minor:
Additionally, changes to `spec.externalTrafficPolicy` have the same effect.
436
+
437
+
#### Major Impact
438
+
439
+
Changes to the following annotations are not allowed by the CCM and can only be implemented by deleting and re-creating the service. This is due to the fact that these changes would cause a load balancer to be re-created, causing major downtime and the loss of the currently associated IP address (with the exception of the Floating IP):
228
440
229
-
The mentioned `externalTrafficPolicy: Local` setting on the service spec is fully supported.
441
+
- `k8s.cloudscale.ch/loadbalancer-flavor`(may be supported in the future).
0 commit comments