Preserving source IP address

Introduction

This guide will explain how you can preserve the client's source IP address of the requests going to your cluster.

This can be useful in scenarios where you want to allow requests only from a defined IP range, or track the IPs for analytics.

How to do it

In your service of type load balancer, add the uses-proxyprotocol annotation:

shell
kubectl annotate service my-service load-balancer.hetzner.cloud/uses-proxyprotocol="true"
Next
Introduction to Syself Autopilot