0

I have one k8s-master, one k8s-workernode.

I created 3 pods, 1 deployment, 1 service(type=ClusterIP).

And kube-proxy-mode was modified to ipvs.

Fixed cluster IP from rr to lc.

(ipvsadm -E -t {ClusterIP:Port} -s lc
ipvsadm-save
ipvsamd-Ln)

However, if you check it after a few seconds, it returns to rr. Why is that?

Grigoriy Mikhalkin
  • 5,035
  • 1
  • 18
  • 36
김관응
  • 1
  • 1

1 Answers1

0

You have to set the mode on the kube proxy command line.

coderanger
  • 52,400
  • 4
  • 52
  • 75
  • Hot to set ipvs mode? kubectl edit configmap kube-proxy -n kube-system and mode: ipvs and also env setting KUBE_PROXY_MODE=ipvs Is there anything else to do? – 김관응 Apr 19 '20 at 14:38
  • Did you reboot the kube-proxy pods? Have checked the [prerequisites](https://github.com/kubernetes/kubernetes/blob/master/pkg/proxy/ipvs/README.md#prerequisite)? – acid_fuji Apr 20 '20 at 07:30
  • You have to pass `–ipvs-scheduler=lc`. Otherwise as you noted kube-proxy uses rr by default. – coderanger Apr 20 '20 at 07:49