Implement IPVS-based in-cluster service load balancing#46580
Implement IPVS-based in-cluster service load balancing#46580k8s-github-robot merged 3 commits intokubernetes:masterfrom
Conversation
|
Hi @dujun1990. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
pkg/proxy/util/conntrack_test.go
Outdated
| } | ||
|
|
||
| if expectCommandExecCount != fexec.CommandCalls { | ||
| t.Errorf("Exepect comand executed %d times, but got %d", expectCommandExecCount, fexec.CommandCalls) |
7f47cbf to
951ea89
Compare
|
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
@fisherxu needs to sign cla? |
|
@k8s-ci-robot have signed the cla, thank you |
|
@k8s-bot ok to test |
|
Thanks. Let's fix test failures. @dhilipkumars @fisherxu |
fbdebf4 to
2a123b5
Compare
2aca284 to
d7cf558
Compare
|
@dujun1990 and @fisherxu Sorry i re-introduced the tests, we need them for sure. But just disabled it when run by non-root user and if the initialization failed. The initialization process also should take care of loading the ip_vs kernel module? how about moving below code into |
|
I suggest keep modprobe ip_vs in We should keep it as Besides, UT failed again, please check? |
|
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
ce9720b to
4a68b93
Compare
|
@k8s-bot pull-kubernetes-unit test this |
|
Sorry for keep bothering you, but I am waiting for your feedback :) |
|
Reviewed 2 of 18 files at r4, 1 of 10 files at r5, 1 of 11 files at r7, 4 of 5 files at r12, 5 of 8 files at r13, 7 of 9 files at r14, 9 of 9 files at r15, 4 of 5 files at r17. Comments from Reviewable |
|
/lgtm Good luck with resyncing this to head of the iptables. I suggest maybe replaying each commit to the iptables proxier against your own. It's not going to be fun, but it needs to be done. Don't forget all the other todos in code and review process. |
Conflicts: pkg/util/ipvs/ipvs_unsupported.go
|
Rebased again to HEAD of master branch due to conflicted with other PR(#47263). Changes only happened in pkg/features/kube_features.go |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dujun1990, thockin Associated issue: 17470 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
| loadModules.Insert(mods...) | ||
| modules := wantModules.Difference(loadModules).List() | ||
| if len(modules) != 0 { | ||
| return false, fmt.Errorf("Failed to load kernel modules: %v", modules) |
There was a problem hiding this comment.
Shouldn't try to modprobe these modules first ?
There was a problem hiding this comment.
Because kube-proxy is running in container.
There was a problem hiding this comment.
kube-proxy isn't always running in a container
|
/test all [submit-queue is verifying that this PR is safe to merge] |
|
Automatic merge from submit-queue (batch tested with PRs 51377, 46580, 50998, 51466, 49749) |
|
@dujun1990: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
I created an issue for tracking all these tasks, see #51602. I will ping you when they are ready for review or I needs your suggestions :) Thanks! |
|
Was adding |
|
also cc @tallclair re: my comment above ^ |
|
That's because IPVS kube-proxy needs the util |
|
@dujun1990 Did not found any information for how to upgrade kube-proxy working more from iptables to ipvs in CHANGELOG, any comments/suggestions for this? |
|
@m1093782566 I mean how to upgrade? If I already have a cluster running with kube-proxy iptables , how can I enable it with ipvs without impacting current workloads? |
|
@gyliu513 drain the node to evict all pods ala: Then you can stop the kube-proxy service, reconfigure it, and restart it. It very much depends on how you've deployed kube-proxy as it might be trickier if you've deployed it via a daemonset. |
|
Actually, IPVS mode is NOT an upgrade from iptables mode - not the relationship of etcd2 -> etcd3. If your "upgrade" means upgrading the software and switch the proxy mode, it very depends on your deployment and kube-proxy provides the Since ipvs rules is totally different from iptables rules and IPVS kube-proxy will clean up all iptables rules before running, service VIP will go down during "upgrade". |
|
got it, thanks @SEJeff @m1093782566 |
What this PR does / why we need it:
Implement IPVS-based in-cluster service load balancing. It can provide some performance enhancement and some other benefits to kube-proxy while comparing iptables and userspace mode. Besides, it also support more sophisticated load balancing algorithms than iptables (least conns, weighted, hash and so on).
Which issue this PR fixes
#17470 #44063
Special notes for your reviewer:
@thockin @quinton-hoole @kevin-wangzefeng @deepak-vij @haibinxie @dhilipkumars @fisherxu
Release note: