Skip to content

Commit 68da66c

Browse files
authored
Merge pull request #8125 from tnozicka/daemonsets-disable-default-node-selector
Warn user to disable default node selector when using daemonsets
2 parents 92950d8 + 1a7b10c commit 68da66c

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

admin_guide/managing_projects.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ $ oc adm new-project myproject \
183183
--node-selector='type=user-node,region=east'
184184
----
185185

186-
Once this command is run, this becomes the adminstrator-set node selector for
186+
Once this command is run, this becomes the administrator-set node selector for
187187
all pods contained in the specified project.
188188

189189
[NOTE]
@@ -215,7 +215,7 @@ You can also override the default value for an existing project namespace by usi
215215
----
216216

217217
If `openshift.io/node-selector` is set to an empty string (`oc adm new-project
218-
--node-selector=""`), the project will not have an adminstrator-set node
218+
--node-selector=""`), the project will not have an administrator-set node
219219
selector, even if the cluster-wide default has been set. This means that, as a
220220
cluster administrator, you can set a default to restrict developer projects to a
221221
subset of nodes and still enable infrastructure or other projects to schedule

dev_guide/daemonsets.adoc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,35 @@ A daemonset can be used to run replicas of a pod on specific or all nodes in an
1919
Use daemonsets to create shared storage, run a logging pod on every node in
2020
your cluster, or deploy a monitoring agent on every node.
2121

22+
For security reasons, only cluster administrators can create daemonsets.
23+
(xref:../admin_guide/manage_rbac.adoc#admin-guide-granting-users-daemonset-permissions[Granting Users Daemonset Permissions.])
24+
2225
For more information on daemonsets, see the link:http://kubernetes.io/docs/admin/daemons/[Kubernetes documentation].
2326

27+
[IMPORTANT]
28+
====
29+
Daemonset scheduling is incompatible with project's default node selector.
30+
If you fail to disable it, the daemonset gets restricted by merging with the
31+
default node selector. This results in frequent pod recreates on the nodes that
32+
got unselected by the merged node selector, which in turn puts unwanted load on
33+
the cluster.
34+
35+
Therefore,
36+
37+
* Before you start using daemonsets, disable the default project-wide
38+
xref:../admin_guide/managing_projects.adoc#using-node-selectors[node selector]
39+
in your namespace, by setting the namespace annotation `openshift.io/node-selector` to an empty string:
40+
41+
----
42+
# oc patch namespace myproject -p \
43+
'{"metadata": {"annotations": {"openshift.io/node-selector": ""}}}'
44+
----
45+
46+
* If you are creating a new project, overwrite the default node selector using
47+
`oc adm new-project --node-selector=""`.
48+
49+
====
50+
2451
[[dev-guide-creating-daemonsets]]
2552
== Creating Daemonsets
2653

0 commit comments

Comments
 (0)