-
Notifications
You must be signed in to change notification settings - Fork 40k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement IPVS-based in-cluster service load balancing #46580
Implement IPVS-based in-cluster service load balancing #46580
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 Instructions 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/comand/command/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fisherxu :)
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.
Instructions 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.
Instructions 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 |
Conflicts: pkg/util/ipvs/ipvs_unsupported.go
8520b09
to
5ed2b44
Compare
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.
Needs 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't try to modprobe these modules first ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because kube-proxy is running in container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. Instructions 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: