k3s/cluster/addons
Kubernetes Submit Queue 5e52db2e4f Merge pull request #35895 from rf232/patch-1
Automatic merge from submit-queue

Update Dashboard UI version to 1.4.2

**What this PR does / why we need it**:

Dashboard 1.4.2 contains a fix for an XSS security bug, so I think it would be prudent to update the Dashboard version 'shipped' with kubernetes to this version

**Special notes for your reviewer**:

**Release note**:
- Updated dashboard version in addons to 1.4.2```
2016-11-14 01:15:12 -08:00
..
addon-manager Fixes token_found bug in addon manager 2016-10-30 21:08:11 -07:00
calico-policy-controller Rename PetSet to StatefulSet in docs and examples. 2016-11-05 00:17:28 -07:00
cluster-loadbalancing Migrates addons from using ReplicationControllers to Deployments 2016-11-09 09:17:05 -08:00
cluster-monitoring Migrates addons from using ReplicationControllers to Deployments 2016-11-09 09:17:05 -08:00
dashboard Update used dashboard version to 1.4.2 2016-11-10 11:49:07 +01:00
dns Merge pull request #36261 from bowei/dnsmasq-metrics-in-dns-pod 2016-11-10 11:09:55 -08:00
dns-horizontal-autoscaler Changed kube-dns-autoscaler's target to Deployment/kube-dns 2016-11-09 09:20:51 -08:00
etcd-empty-dir-cleanup Add cleanup addon pod to remove empty keys in etcd 2016-08-09 15:59:45 -07:00
fluentd-elasticsearch Merge pull request #36008 from MrHohn/addon-rc-migrate 2016-11-10 02:36:38 -08:00
fluentd-gcp/fluentd-gcp-image Fix flunetd-gcp image Dockerfile 2016-11-08 15:14:09 +01:00
node-problem-detector Remove unnecessary configuration for apiserver host and port. 2016-06-09 17:56:57 -07:00
podsecuritypolicies default policy 2016-05-11 18:07:36 -04:00
python-image Fix typos and linted_packages sorting 2016-10-31 18:31:08 +01:00
registry Fix Docker Registry image version to 2.5.1 2016-11-09 12:46:40 -08:00
BUILD gazel 2016-10-21 17:31:54 -07:00
README.md Updated addon manager READMEs 2016-10-17 21:10:12 -07:00

README.md

Cluster add-ons

Cluster add-ons are resources like Services and Deployments (with pods) that are shipped with the Kubernetes binaries and are considered an inherent part of the Kubernetes clusters. The add-ons are visible through the API (they can be listed using kubectl), but direct manipulation of these objects through Apiserver is discouraged because the system will bring them back to the original state, in particular:

  • If an add-on is deleted, it will be recreated automatically.
  • If an add-on is updated through Apiserver, it will be reconfigured to the state given by the supplied fields in the initial config. Though it is fine to modify a field that was unspecified.

On the cluster, the add-ons are kept in /etc/kubernetes/addons on the master node, in yaml / json files. The addon manager periodically kubectl applys the contents of this directory. Any legit modification would be reflected on the API objects accordingly. Particularly, rolling-update for deployments is now supported.

Each add-on must specify the following label: kubernetes.io/cluster-service: true. Config files that do not define this label will be ignored. For those resources exist in kube-system namespace but not in /etc/kubernetes/addons, addon manager will attempt to remove them if they are attached with this label. Currently the other usage of kubernetes.io/cluster-service is for kubectl cluster-info command to recognize these cluster services.

The suggested naming for most types of resources is just <basename> (with no version number) because we do not expect the resource name to change. But resources like Pod , ReplicationController and DaemonSet are exceptional. As Pod updates may not change fields other than containers[*].image or spec.activeDeadlineSeconds and may not add or remove containers, it may not be sufficient during a major update. For ReplicationController, most of the modifications would be legit, but the underlying pods would not got re-created automatically. DaemonSet has similar problem as the ReplicationController. In these cases, the suggested naming is <basename>-<version>. When version changes, the system will delete the old one and create the new one (order not guaranteed).

Add-on update procedure

To update add-ons, just update the contents of /etc/kubernetes/addons directory with the desired definition of add-ons. Then the system will take care of:

  • Removing objects from the API server whose manifest was removed.
  • Creating objects from new manifests
  • Updating objects whose fields are legally changed.

Cooperating with Horizontal / Vertical Auto-Scaling

As all cluster add-ons will be reconciled to the original state given by the initial config. In order to make Horizontal / Vertical Auto-scaling functional, the related fields in config should be left unset. More specifically, leave replicas in ReplicationController / Deployment / ReplicaSet unset for Horizontal Scaling, and leave resources for container unset for Vertical Scaling. The periodical update won't include these specs, which will be managed by Horizontal / Vertical Auto-scaler.

Analytics