Skip to content

Let you get real client IP in k8s pod using toa. Only works if your kubeproxy is using ipvs mode.

License

Notifications You must be signed in to change notification settings

wavezhang/k8s-ipvs-toa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

k8s-ipvs-toa

Let you get real client IP in k8s pod using toa. Only works if your kubeproxy is using ipvs mode.

Test on kernel 4.14 only, should work on 4.x, and should work on linux 3.10 with minor modification.

How to use

  1. Download your target kernel source. For example:
wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.49.tar.xz
tar -xf linux-4.14.49.tar.xz
cd linux-4.14.49
  1. Apply the patch
patch -p1 < ../k8s-ipvs-toa/k8s-ipvs.patch
  1. Compile kernel modules

Refer to https://wiki.archlinux.org/index.php/Kernel/Traditional_compilation#Compilation_and_installation if you donot known how to compile the kernel.

  1. Install kernel modules

Install newly compiled ipvs kernel modules and toa kernel modules on all k8s nodes.

  1. Test You will see real client IP in Pod.

About

Let you get real client IP in k8s pod using toa. Only works if your kubeproxy is using ipvs mode.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published