Production-Grade Container Scheduling and Management
Go to file
Kubernetes Submit Queue e6c2a5de10
Merge pull request #57461 from danwinship/proxier-no-dummy-nat-rules
Automatic merge from submit-queue (batch tested with PRs 55637, 57461, 60268, 60290, 60210). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Don't create no-op iptables rules for services with no endpoints

Currently for all services we create `-t nat -A KUBE-SERVICES` rules that match the destination IPs (ClusterIP, ExternalIP, NodePort IPs, etc) and then jump to the appropriate `KUBE-SVC-XXXXXX` chain. But if the service has no endpoints then the `KUBE-SVC-XXXXXX` chain will be empty and so nothing happens except that we wasted time (a) forcing iptables-restore to parse the match rules, and (b) forcing the kernel to test matches that aren't going to have any effect.

This PR gets rid of the match rules in this case. Which is to say, it changes things so that every incoming service packet is matched *either* by nat rules to rewrite it *or* by filter rules to ICMP reject it, but not both. (Actually, that's not quite true: there are no filter rules to reject Ingress-addressed packets, and I *think* that's a bug?)

I also got rid of some comments that seemed redundant.

The patch is mostly reindentation, so best viewed with `diff -w`.

Partial fix for #56842 / Related to #56164 (which it conflicts with but I'll fix that after one or the other merges).

**Release note**:
```release-note
Removed some redundant rules created by the iptables proxier, to improve performance on systems with very many services.
```
2018-02-23 09:49:38 -08:00
.github
api Merge pull request #59510 from smarterclayton/services_table 2018-02-23 02:59:43 -08:00
build Merge pull request #57648 from Fsero/bugfix/add_ipset_binary_for_ipvs 2018-02-21 11:42:42 -08:00
cluster Merge pull request #60251 from mikedanese/extra-addons 2018-02-23 01:44:48 -08:00
cmd Merge pull request #59719 from hzxuzhonghu/pprof-profiling 2018-02-23 00:34:22 -08:00
docs Merge pull request #59510 from smarterclayton/services_table 2018-02-23 02:59:43 -08:00
examples Merge pull request #60145 from php-coder/psp_authz_via_policy_group 2018-02-23 07:55:23 -08:00
Godeps Merge pull request #60106 from dashpole/cadvisor_godep 2018-02-23 02:59:38 -08:00
hack Merge pull request #60196 from marpaia/unset-cdpath 2018-02-23 01:44:33 -08:00
logo
pkg Merge pull request #57461 from danwinship/proxier-no-dummy-nat-rules 2018-02-23 09:49:38 -08:00
plugin Run hack/update-bazel.sh 2018-02-22 19:23:02 +01:00
staging Merge pull request #59510 from smarterclayton/services_table 2018-02-23 02:59:43 -08:00
test Merge pull request #59510 from smarterclayton/services_table 2018-02-23 02:59:43 -08:00
third_party Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
translations
vendor Merge pull request #60106 from dashpole/cadvisor_godep 2018-02-23 02:59:38 -08:00
.bazelrc
.generated_files
.gitattributes
.gitignore fix all the typos across the project 2018-02-11 11:04:14 +08:00
.kazelcfg.json
BUILD.bazel
CHANGELOG-1.2.md
CHANGELOG-1.3.md
CHANGELOG-1.4.md
CHANGELOG-1.5.md
CHANGELOG-1.6.md
CHANGELOG-1.7.md
CHANGELOG-1.8.md Update CHANGELOG-1.8.md for v1.8.8. 2018-02-09 15:01:39 -08:00
CHANGELOG-1.9.md Merge pull request #59464 from dixudx/fix_all_typos 2018-02-10 22:12:45 -08:00
CHANGELOG-1.10.md Merge pull request #59250 from thedrow/patch-1 2018-02-20 20:00:38 -08:00
CHANGELOG.md
code-of-conduct.md
CONTRIBUTING.md
labels.yaml
LICENSE
Makefile
Makefile.generated_files
OWNERS
OWNERS_ALIASES Merge pull request #59977 from ravisantoshgudimetla/add-to-maintainers 2018-02-21 15:40:38 -08:00
README.md Update README.md 2018-02-11 04:34:01 +00:00
SUPPORT.md
WORKSPACE

Kubernetes

Submit Queue Widget GoDoc Widget CII Best Practices


Kubernetes is an open source system for managing containerized applications across multiple hosts; providing basic mechanisms for deployment, maintenance, and scaling of applications.

Kubernetes builds upon a decade and a half of experience at Google running production workloads at scale using a system called Borg, combined with best-of-breed ideas and practices from the community.

Kubernetes is hosted by the Cloud Native Computing Foundation (CNCF). If you are a company that wants to help shape the evolution of technologies that are container-packaged, dynamically-scheduled and microservices-oriented, consider joining the CNCF. For details about who's involved and how Kubernetes plays a role, read the CNCF announcement.


To start using Kubernetes

See our documentation on kubernetes.io.

Try our interactive tutorial.

Take a free course on Scalable Microservices with Kubernetes.

To start developing Kubernetes

The community repository hosts all information about building Kubernetes from source, how to contribute code and documentation, who to contact about what, etc.

If you want to build Kubernetes right away there are two options:

You have a working Go environment.
$ go get -d k8s.io/kubernetes
$ cd $GOPATH/src/k8s.io/kubernetes
$ make
You have a working Docker environment.
$ git clone https://github.com/kubernetes/kubernetes
$ cd kubernetes
$ make quick-release

For the full story, head over to the developer's documentation.

Support

If you need support, start with the troubleshooting guide, and work your way through the process that we've outlined.

That said, if you have questions, reach out to us one way or another.

Analytics