Merge pull request #7125 from ravisantoshgudimetla/patch-1

Update critical pods documentation to include priorities.
pull/7384/head
Joseph Heck 2018-02-14 17:14:52 -08:00 committed by GitHub
commit ef265d7dcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 6 deletions

View File

@ -19,6 +19,12 @@ and becomes pending (for example when the cluster is highly utilized and either
vacated by the evicted critical add-on pod or the amount of resources available on the node changed for some other reason).
## Rescheduler: guaranteed scheduling of critical add-ons
**Rescheduler is deprecated as of Kubernetes 1.10 and will be removed in version 1.11 in
accordance with the [deprecation policy](/docs/reference/deprecation-policy) for beta features.**
**To avoid eviction of critical pods, you must
[enable priorities in scheduler](docs/concepts/configuration/pod-priority-preemption/)
before upgrading to Kubernetes 1.10 or higher.**
Rescheduler ensures that critical add-ons are always scheduled
(assuming the cluster has enough resources to run the critical add-on pods in the absence of regular pods).
@ -35,18 +41,24 @@ while the other pods shouldn't tolerate the taint. The taint is removed once the
*Warning:* currently there is no guarantee which node is chosen and which pods are being killed
in order to schedule critical pods, so if rescheduler is enabled your pods might be occasionally
killed for this purpose.
killed for this purpose. Please ensure that rescheduler is not enabled along with priorities & preemptions in default-scheduler as rescheduler is oblivious to priorities and it may evict high priority pods, instead of low priority ones.
## Config
Rescheduler should be enabled by default. It doesn't have any user facing configuration (component config) or API.
Rescheduler may also be disabled.
Rescheduler doesn't have any user facing configuration (component config) or API.
### Marking add-on as critical
### Marking pod as critical when using Rescheduler.
** Marking pod as critical when using Rescheduler.
To be critical an add-on has to run in `kube-system` namespace (configurable via flag) and
To be considered critical, the pod has to run in the `kube-system` namespace (configurable via flag) and
* have the `scheduler.alpha.kubernetes.io/critical-pod` annotation set to empty string, and
* have the PodSpec's `tolerations` field set to `[{"key":"CriticalAddonsOnly", "operator":"Exists"}]`
* have the PodSpec's `tolerations` field set to `[{"key":"CriticalAddonsOnly", "operator":"Exists"}]`.
The first one marks a pod a critical. The second one is required by Rescheduler algorithm.
### Marking pod as critical when priorites are enabled.
To be considered critical, the pod has to run in the `kube-system` namespace (configurable via flag) and
* Have the priorityClass set as "system-cluster-critical" or "system-node-critical", the latter being the highest for entire cluster and `scheduler.alpha.kubernetes.io/critical-pod` annotation set to empty string(This will be deprecated too).