Change proxy mode in kubernetes

6/4/2019

I have installed kubernetes cluster using this tutorial on ubuntu 16. everything works but I need change proxy mode (ipvs) and I don't know how can I change kube-proxy mode using kubectl or something else.

-- Milux
kubernetes

1 Answer

6/4/2019

kubectl is more for managing the kubernetes workload. You need to modify the control plane itself. Since you created your cluster with kubeadm, you can use that to enable ipvs. You'd add this to your config file for kube init.

...
kubeProxy:
  config:
    featureGates:
      SupportIPVSProxyMode: true
    mode: ipvs
...

Here's an article from github.com/kubernetes with more detailed instructions. Depending on your kubernetes version, you can pass it as a flag to kube init instead of using the above configuration.

Edit: Here's a link on how to use kubeadm to edit an existing cluster: How to use kubeadm upgrade to change some features in kubeadm-config

-- frankd
Source: StackOverflow