Skip to content

Commit 8156163

Browse files
author
Misty Stanley-Jones
committed
More feedback
1 parent 5c89568 commit 8156163

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

content/en/docs/tasks/administer-cluster/sysctl-cluster.md

+17-14
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,10 @@ Only _namespaced_ sysctls can be enabled this way.
9292

9393
A number of sysctls are _namespaced_ in today's Linux kernels. This means that
9494
they can be set independently for each pod on a node. Only namespaced sysctls
95-
are accessible in the pod security context within Kubernetes.
95+
are configurable via the pod securityContext within Kubernetes.
9696

97-
The following sysctls are _namespaced_:
97+
The following sysctls are known to be namespaced. This list could change
98+
in future versions of the Linux kernel.
9899

99100
- `kernel.shm*`,
100101
- `kernel.msg*`,
@@ -106,8 +107,8 @@ Sysctls with no namespace are called _node-level_ sysctls. If you need to set
106107
them, you must manually configure them on each node's operating system, or by
107108
using a DaemonSet with privileged containers.
108109

109-
For namespaced sysctls, use the pod securityContext to configure sysctls. They
110-
apply to all containers in the same pod.
110+
Use the pod securityContext to configure namespaced sysctls. The securityContext
111+
applies to all containers in the same pod.
111112

112113
This example uses the pod securityContext to set a safe sysctl
113114
`kernel.shm_rmid_forced` and two unsafe sysctls `net.ipv4.route.min_pmtu` and
@@ -159,23 +160,25 @@ to schedule those pods onto the right nodes.
159160

160161
## PodSecurityPolicy
161162

162-
To control which sysctls can be set in pods, specify the
163-
`forbiddenSysctls` and/or `allowedUnsafeSysctls` fields in the PodSecurityPolicy.
163+
You can further control which sysctls can be set in pods by specifying lists of
164+
sysctls or sysctl patterns in the `forbiddenSysctls` and/or
165+
`allowedUnsafeSysctls` fields of the PodSecurityPolicy. A sysctl pattern ends
166+
with a `*` character, such as `kernel.*`. A `*` character on its own matches
167+
all sysctls.
164168

165-
By default, all safe sysctls in the whitelist are allowed.
169+
By default, all safe sysctls are allowed.
166170

167171
Both `forbiddenSysctls` and `allowedUnsafeSysctls` are lists of plain sysctl names
168172
or sysctl patterns (which end with `*`). The string `*` matches all sysctls.
169173

170-
The `forbiddenSysctls` field excludes specific sysctls, and can include a
171-
combination of safe and unsafe ones. To forbid setting any sysctls, use `*` on
172-
its own.
174+
The `forbiddenSysctls` field excludes specific sysctls. You can forbid a
175+
combination of safe and unsafe sysctls in the list. To forbid setting any
176+
sysctls, use `*` on its own.
173177

174178
If you specify any unsafe sysctl in the `allowedUnsafeSysctls` field and it is
175-
not present in the `forbiddenSysctls` field, that sysctl can be used in Pods under
176-
this PodSecurityPolicy. In order to allow all unsafe sysctls in the PodSecurityPolicy
177-
to be set (except for those explicitly forbidden by `forbiddenSysctls`),
178-
use `*` on its own.
179+
not present in the `forbiddenSysctls` field, that sysctl can be used in Pods
180+
using this PodSecurityPolicy. To allow all unsafe sysctls in the
181+
PodSecurityPolicy to be set, use `*` on its own.
179182

180183
Do not configure these two fields such that there is overlap, meaning that a
181184
given sysctl is both allowed and forbidden.

0 commit comments

Comments
 (0)