kubernetes/cluster
Kubernetes Submit Queue 4e20339916 Merge pull request #34513 from MrHohn/addon-manager-upgrade
Automatic merge from submit-queue

Upgrade addon-manager with kubectl apply

The first step of #33698.

Use `kubectl apply` to replace addon-manager's previous logic.

The most important issue this PR is targeting is the upgrade from 1.4 to 1.5. Procedure as below:

1. Precondition: After the master is upgraded, new addon-manager starts and all the old resources on nodes are running normally.
2. Annotate the old ReplicationController resources with kubectl.kubernetes.io/last-applied-configuration=""
3. Call `kubectl apply --prune=false` on addons folder to create new addons, including the new Deployments.
4. Wait for one minute for new addons to be spinned up.
5. Enter the periodical loop of `kubectl apply --prune=true`. The old RCs will be pruned at the first call.

Procedure of a normal startup:

1. Addon-manager starts and no addon resources are running.
2. Annotate nothing.
3. Call `kubectl apply --prune=false` to create all new addons.
4. No need to explain the remain.

Remained Issues:
- Need to add `--type` flag to `kubectl apply --prune`, mentioned [here](https://github.com/kubernetes/kubernetes/pull/33075#discussion_r80814070).
- This addon manager is not working properly with the current Deployment heapster, which runs [addon-resizer](https://github.com/kubernetes/contrib/tree/master/addon-resizer) in the same pod and changes resource limit configuration through the apiserver. `kubectl apply` fights with the addon-resizers. May be we should remove the initial resource limit field in the configuration file for this specific Deployment as we removed the replica count.

@mikedanese @thockin @bprashanth 

---

Below are some logical things that may need to be clarified, feel free to **OMIT** them as they are too verbose:
- For upgrade, the old RCs will not fight with the new Deployments during the overlap period even if they use the same label in template:
 - Deployment will not recognize the old pods because it need to match an additional "pod-template-hash" label.
 - ReplicationController will not manage the new pods (created by deployment) because the [`controllerRef`](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/controller-ref.md) feature.
- As we are moving all addons to Deployment, all old RCs would be removed. Attach empty annotation to RCs is only for letting `kubectl apply --prune` to recognize them, the content does not matter.
- We might need to also annotate other resource types if we plan to upgrade them in 1.5 release:
 - They don't need to be attached this fake annotation if they remain in the same name. `kubectl apply` can recognize them by name/type/namespace.
 - In the other case, attaching empty annotations to them will still work. As the plan is to use label selector for annotate, some innocence old resources may also be attached empty annotations, they work as below two cases:
    - Resources that need to be bumped up to a newer version (mainly due to some significant update --- change disallowed fields --- that could not be managed by the update feature of `kubectl apply`) are good to go with this fake annotation, as old resources will be deleted and new sources will be created. The content in annotation does not matter.
    - Resources that need to stay inside the management of `kubectl apply` is also good to go. As `kubectl apply` will [generate a 3-way merge patch](https://github.com/kubernetes/kubernetes/blob/master/pkg/util/strategicpatch/patch.go#L1202-L1226).  This empty annotation is harmless enough.
2016-10-15 08:49:52 -07:00
..
addons Merge pull request #34513 from MrHohn/addon-manager-upgrade 2016-10-15 08:49:52 -07:00
aws fixup: iam roles are now uniquely identified by CLUSTER_ID + VPC_ID 2016-10-11 11:54:55 -07:00
azure azure kube-up respects AZURE_RESOURCE_GROUP 2016-07-08 11:59:32 -07:00
azure-legacy [squash] Rename and move to storageclass/ 2016-08-22 14:11:01 +02:00
centos Fix typo: incremeting -> incrementing 2016-09-24 16:10:51 -04:00
gce Merge pull request #34753 from ivan4th/fix-misspellings-of-kubernetes 2016-10-14 03:09:01 -07:00
gke Don't fail teardown if we can't delete the network 2016-10-13 12:24:22 -07:00
images Merge pull request #34487 from jessfraz/update-gcloud-docker-commands 2016-10-13 07:04:59 -07:00
juju Merge pull request #32874 from mthaddon/master 2016-10-15 02:53:16 -07:00
kubemark Make it possible to set etcd version in kubemark 2016-09-27 13:13:29 +02:00
lib Add a verbosity concept to kubernetes scripts 2016-08-04 22:01:22 -07:00
libvirt-coreos [squash] Rename and move to storageclass/ 2016-08-22 14:11:01 +02:00
local Merge pull request #28469 from asalkeld/local-e2e 2016-09-11 05:44:47 -07:00
mesos/docker Remove support for boot2docker 2016-10-03 19:42:20 -07:00
openstack-heat Merge pull request #27783 from jianhuiz/openstack-heat-network 2016-09-07 16:25:02 -07:00
ovirt
photon-controller [squash] Rename and move to storageclass/ 2016-08-22 14:11:01 +02:00
rackspace Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
saltbase Set target version env in etcd manifest 2016-10-12 14:34:44 +02:00
skeleton Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
ubuntu Merge pull request #32667 from wingedfox/master 2016-10-15 02:12:58 -07:00
vagrant Added DEFAULT_NETWORK_IF_NAME when starting nodes. 2016-10-08 17:20:38 +08:00
vsphere Fix misspellings of 'Kubernetes' 2016-10-13 22:49:21 +03:00
common.sh Show errors in tars_from_version 2016-09-19 16:26:07 +02:00
get-kube-binaries.sh Create a get-kube-binaries script to download client/server tarballs 2016-10-07 16:01:27 -07:00
get-kube-local.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
get-kube.sh Create a get-kube-binaries script to download client/server tarballs 2016-10-07 16:01:27 -07:00
kube-down.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
kube-push.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
kube-up.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
kube-util.sh federation: aws compatibility for cluster and e2e frameworks 2016-10-07 11:25:18 -07:00
kubectl.sh Make releases work 2016-07-12 21:52:54 -07:00
log-dump.sh log-dump.sh: Fix kubemark log-dump.sh 2016-10-12 13:47:36 -07:00
options.md Minion->Name rename: cluster/vagrant, docs and Vagrantfile 2015-12-02 12:45:12 -08:00
OWNERS Add jbeda to OWNERS for build, cluster, hack 2016-09-27 14:53:16 -07:00
README.md add maintenance notice to cluster/README 2016-06-13 11:47:30 -07:00
test-e2e.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
test-network.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
test-smoke.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
update-storage-objects.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
validate-cluster.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00

Cluster Configuration

Deprecation Notice: This directory has entered maintainence mode and will not be accepting new providers. Please submit new automation deployments to kube-deploy. Deployments in this directory will continue to be maintained and supported at their current level of support.

The scripts and data in this directory automate creation and configuration of a Kubernetes cluster, including networking, DNS, nodes, and master components.

See the getting-started guides for examples of how to use the scripts.

cloudprovider/config-default.sh contains a set of tweakable definitions/parameters for the cluster.

The heavy lifting of configuring the VMs is done by SaltStack.

Analytics