Production-Grade Container Scheduling and Management
Go to file
Tim Hockin 4f8fb1d3ca Wipe some fields on service "type" updates
Service has had a problem since forever:

- User creates a service type=LoadBalancer
- We silently allocate them a NodePort
- User changes type to ClusterIP
- We fail the operation because they did not clear NodePort

They never asked for or used the NodePort!

Dual-stack introduced some dependent fields that get auto-wiped on
updates.  This carries it further.

If you squint, you can see Service as a big, messy discriminated union,
with type as the discriminator. Ignoring fields for non-selected
union-modes seems right.

This introduces the potential for an apply loop. Specifically, we will
accept YAML that we did not previously accept. Apply could see the
field in local YAML and not in the server and repeatedly try to patch it
in. But since that YAML is currently an error, it seems like a very low
risk. Almost nobody actually specifies their own NodePort values.

To mitigate this somewhat, we only auto-wipe on updates. The same YAML
would fail to create. This is a little inconsistent. We could
auto-wipe on create, too, at the risk of more potential impact.

To do this properly, we need to know the old and new values, which means
we can not do it in defaulting or conversion. So we do it in strategy.

This change also adds unit tests and updates e2e tests to rely on and
verify this behavior.
2020-10-28 10:41:26 -07:00
.github Update triage/support label references to kind/support 2020-10-01 20:09:37 -04:00
api Wipe some fields on service "type" updates 2020-10-28 10:41:26 -07:00
build Merge pull request #77398 from claudiubelu/test-images/windows-support-part-2 2020-10-26 06:19:02 -07:00
CHANGELOG CHANGELOG: Update directory for v1.20.0-alpha.3 release 2020-10-20 09:21:27 +00:00
cluster Merge pull request #95943 from aojea/upgradejob 2020-10-28 06:39:56 -07:00
cmd Merge pull request #95630 from masap/unit_test1 2020-10-27 14:25:57 -07:00
docs Add sigs for root folders 2020-08-13 10:24:06 -04:00
hack Merge pull request #95810 from ruiwen-zhao/staticcheck_fix 2020-10-28 07:45:55 -07:00
LICENSES Bump github.com/Azure/go-autorest/autorest/adal to 0.9.5 2020-10-19 09:59:45 +02:00
logo Merge pull request #93975 from avr1254/master 2020-09-03 06:16:09 -07:00
pkg Wipe some fields on service "type" updates 2020-10-28 10:41:26 -07:00
plugin Move client_builder to k8s.io/controller-manager 2020-10-19 14:48:22 -07:00
staging Wipe some fields on service "type" updates 2020-10-28 10:41:26 -07:00
test Wipe some fields on service "type" updates 2020-10-28 10:41:26 -07:00
third_party test images: Fixes echoserver s390x image 2020-09-17 09:34:40 +00:00
translations Merge pull request #93975 from avr1254/master 2020-09-03 06:16:09 -07:00
vendor Merge pull request #95428 from roycaihw/cleanup/generalize-lease-controller 2020-10-23 13:43:02 -07:00
.bazelrc move build related files out of the root directory 2017-05-15 15:53:54 -07:00
.bazelversion Add .bazelversion file 2019-09-19 08:57:12 +02:00
.generated_files Purge almost all memories of godep 2020-05-07 21:49:00 -07:00
.gitattributes review staging go.mod files 2019-05-10 15:40:43 -04:00
.gitignore Add openapi generation for the kube-aggregator 2020-06-05 11:10:08 +08:00
.kazelcfg.json Switch from gazel to kazel, and move kazelcfg into build/root 2017-07-18 12:48:51 -07:00
BUILD.bazel move build related files out of the root directory 2017-05-15 15:53:54 -07:00
CHANGELOG.md CHANGELOG: Move changelog, soft-link to top-level, refresh listing 2020-02-06 01:04:44 -05:00
code-of-conduct.md Update code-of-conduct.md 2017-12-20 13:33:36 -05:00
CONTRIBUTING.md fix Contributor License Agreement broken link 2020-06-28 11:55:22 +06:00
go.mod Fix dependency linting 2020-10-19 11:33:30 +02:00
go.sum Fix dependency linting 2020-10-19 11:33:30 +02:00
LICENSE
Makefile move build related files out of the root directory 2017-05-15 15:53:54 -07:00
Makefile.generated_files move build related files out of the root directory 2017-05-15 15:53:54 -07:00
OWNERS Move brendandburns to to emeritus status. 2020-08-27 10:20:56 -04:00
OWNERS_ALIASES Merge pull request #94953 from mattjmcnaughton/mattjmcnaughton/remove-mattjmcnaughton-as-sig-node-reviewer 2020-10-27 10:36:01 -07:00
README.md Removed broken link to Analytics 2020-08-13 16:03:37 -04:00
SECURITY_CONTACTS Update SECURITY_CONTACTS with current PSC 2019-05-29 15:22:35 +05:30
SUPPORT.md delete all duplicate empty blanks 2019-02-23 10:28:04 +08:00
WORKSPACE move build related files out of the root directory 2017-05-15 15:53:54 -07:00

Kubernetes

GoDoc Widget CII Best Practices


Kubernetes is an open source system for managing containerized applications across multiple hosts. It provides 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 your company 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 use Kubernetes code as a library in other applications, see the list of published components. Use of the k8s.io/kubernetes module or k8s.io/kubernetes/... packages as libraries is not supported.

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.
mkdir -p $GOPATH/src/k8s.io
cd $GOPATH/src/k8s.io
git clone https://github.com/kubernetes/kubernetes
cd 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.