You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/architecture/nodes.md
+24-1Lines changed: 24 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,27 @@ The node condition is represented as a JSON object. For example, the following r
65
65
66
66
If the Status of the Ready condition is "Unknown" or "False" for longer than the `pod-eviction-timeout`, an argument is passed to the [kube-controller-manager](/docs/admin/kube-controller-manager) and all of the Pods on the node are scheduled for deletion by the Node Controller. The default eviction timeout duration is **five minutes**. In some cases when the node is unreachable, the apiserver is unable to communicate with the kubelet on it. The decision to delete the pods cannot be communicated to the kubelet until it re-establishes communication with the apiserver. In the meantime, the pods which are scheduled for deletion may continue to run on the partitioned node.
67
67
68
-
In versions of Kubernetes prior to 1.5, the node controller would [force delete](/docs/concepts/workloads/pods/pod/#force-deletion-of-pods) these unreachable pods from the apiserver. However, in 1.5 and higher, the node controller does not force delete pods until it is confirmed that they have stopped running in the cluster. One can see these pods which may be running on an unreachable node as being in the "Terminating" or "Unknown" states. In cases where Kubernetes cannot deduce from the underlying infrastructure if a node has permanently left a cluster, the cluster administrator may need to delete the node object by hand. Deleting the node object from Kubernetes causes all the Pod objects running on it to be deleted from the apiserver, freeing up their names.
68
+
In versions of Kubernetes prior to 1.5, the node controller would [force delete](/docs/concepts/workloads/pods/pod/#force-deletion-of-pods)
69
+
these unreachable pods from the apiserver. However, in 1.5 and higher, the node controller does not force delete pods until it is
70
+
confirmed that they have stopped running in the cluster. One can see these pods which may be running on an unreachable node as being in
71
+
the "Terminating" or "Unknown" states. In cases where Kubernetes cannot deduce from the underlying infrastructure if a node has
72
+
permanently left a cluster, the cluster administrator may need to delete the node object by hand. Deleting the node object from
73
+
Kubernetes causes all the Pod objects running on it to be deleted from the apiserver, freeing up their names.
74
+
75
+
Version 1.8 introduces an alpha feature that automatically creates
76
+
[taints](/docs/concepts/configuration/taint-and-toleration) that represent conditions.
77
+
To enable this behavior, pass an additional feature gate flag `--feature-gates=...,TaintNodesByCondition=true`
78
+
to the API server, controller manager, and scheduler.
79
+
When `TaintNodesByCondition` is enabled, the scheduler ignores conditions when considering a Node; instead
80
+
it looks at the Node's taints and a Pod's tolerations.
81
+
82
+
Now users can choose between the old scheduling model and a new, more flexible scheduling model.
83
+
A Pod that does not have any tolerations gets scheduled according to the old model. But a Pod that
84
+
tolerates the taints of a particular Node can be scheduled on that Node.
85
+
86
+
Note that because of small delay, usually less than one second, between time when condition is observed and a taint
87
+
is created, it's possible that enabling this feature will slightly increase number of Pods that are successfully
88
+
scheduled but rejected by the kubelet.
69
89
70
90
### Capacity
71
91
@@ -174,6 +194,9 @@ NodeController is responsible for adding taints corresponding to node problems l
174
194
node unreachable or not ready. See [this documentation](/docs/concepts/configuration/taint-and-toleration)
175
195
for details about `NoExecute` taints and the alpha feature.
176
196
197
+
Starting in version 1.8, the node controller can be made responsible for creating taints that represent
198
+
Node conditions. This is an alpha feature of version 1.8.
199
+
177
200
### Self-Registration of Nodes
178
201
179
202
When the kubelet flag `--register-node` is true (the default), the kubelet will attempt to
* `node.kubernetes.io/outOfDisk` (*only for critical pods*)
255
252
256
253
This ensures that DaemonSet pods are never evicted due to these problems,
257
254
which matches the behavior when this feature is disabled.
255
+
256
+
## Taint Nodes by Condition
257
+
258
+
Version 1.8 introduces an alpha feature that causes the node controller to create taints corresponding to
259
+
Node conditions. When this feature is enabled, the scheduler does not check conditions; instead the scheduler checks taints. This assures that conditions don't affect what's scheduled onto the Node. The user can choose to ignore some of the Node's problems (represented as conditions) by adding appropriate Pod tolerations.
260
+
261
+
To make sure that turning on this feature doesn't break DaemonSets, starting in version 1.8, the DaemonSet controller automatically adds the following `NoSchedule` tolerations to all daemons:
262
+
263
+
* `node.kubernetes.io/memory-pressure`
264
+
* `node.kubernetes.io/disk-pressure`
265
+
* `node.kubernetes.io/out-of-disk` (*only for critical pods*)
266
+
267
+
The above settings ensure backward compatibility, but we understand they may not fit all user's needs, which is why
268
+
cluster admin may choose to add arbitrary tolerations to DaemonSets.
Copy file name to clipboardExpand all lines: docs/concepts/workloads/pods/init-containers.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,8 @@ scripts not present in an app image.
14
14
15
15
This feature has exited beta in 1.6. Init Containers can be specified in the PodSpec
16
16
alongside the app `containers` array. The beta annotation value will still be respected
17
-
and overrides the PodSpec field value.
17
+
and overrides the PodSpec field value, however, they are deprecated in 1.6 and 1.7.
18
+
In 1.8, the annotations are no longer supported and must be converted to the PodSpec field.
18
19
19
20
{% capture body %}
20
21
## Understanding Init Containers
@@ -123,7 +124,7 @@ spec:
123
124
command: ['sh', '-c', 'echo The app is running! && sleep 3600']
124
125
```
125
126
126
-
There is a new syntax in Kubernetes 1.6, although the old annotation syntax still works. We have moved the declaration of init containers to `spec`:
127
+
There is a new syntax in Kubernetes 1.6, although the old annotation syntax still works for 1.6 and 1.7. The new syntax must be used for 1.8 or greater. We have moved the declaration of init containers to `spec`:
127
128
128
129
```yaml
129
130
apiVersion: v1
@@ -146,7 +147,7 @@ spec:
146
147
command: ['sh', '-c', 'until nslookup mydb; do echo waiting for mydb; sleep 2; done;']
147
148
```
148
149
149
-
1.5 syntax still works on 1.6, but we recommend using 1.6 syntax. In Kubernetes 1.6, Init Containers were made a field in the API. The beta annotation is still respected but will be deprecated in future releases.
150
+
1.5 syntax still works on 1.6, but we recommend using 1.6 syntax. In Kubernetes 1.6, Init Containers were made a field in the API. The beta annotation is still respected in 1.6 and 1.7, but is not supported in 1.8 or greater.
150
151
151
152
Yaml file below outlines the `mydb` and `myservice` services:
152
153
@@ -311,6 +312,10 @@ into alpha and beta annotations so that Kubelets version 1.3.0 or greater can ex
311
312
Init Containers, and so that a version 1.6 apiserver can safely be rolled back to version
312
313
1.5.x without losing Init Container functionality for existing created pods.
313
314
315
+
In Apiserver and Kubelet versions 1.8.0 or greater, support for the alpha and beta annotations
316
+
is removed, requiring a conversion from the deprecated annotations to the
0 commit comments