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: content/en/docs/tasks/administer-cluster/securing-a-cluster.md
+15-13Lines changed: 15 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ and provides recommendations on overall security.
26
26
27
27
## Controlling access to the Kubernetes API
28
28
29
-
As Kubernetes is entirely APIdriven, controlling and limiting who can access the cluster and what actions
29
+
As Kubernetes is entirely API-driven, controlling and limiting who can access the cluster and what actions
30
30
they are allowed to perform is the first line of defense.
31
31
32
32
### Use Transport Layer Security (TLS) for all API traffic
@@ -40,7 +40,7 @@ potentially unsecured traffic.
40
40
### API Authentication
41
41
42
42
Choose an authentication mechanism for the API servers to use that matches the common access patterns
43
-
when you install a cluster. For instance, small singleuser clusters may wish to use a simple certificate
43
+
when you install a cluster. For instance, small, single-user clusters may wish to use a simple certificate
44
44
or static Bearer token approach. Larger clusters may wish to integrate an existing OIDC or LDAP server that
45
45
allow users to be subdivided into groups.
46
46
@@ -54,7 +54,7 @@ Consult the [authentication reference document](/docs/reference/access-authn-aut
54
54
Once authenticated, every API call is also expected to pass an authorization check. Kubernetes ships
55
55
an integrated [Role-Based Access Control (RBAC)](/docs/reference/access-authn-authz/rbac/) component that matches an incoming user or group to a
56
56
set of permissions bundled into roles. These permissions combine verbs (get, create, delete) with
57
-
resources (pods, services, nodes) and can be namespace or clusterscoped. A set of out of thebox
57
+
resources (pods, services, nodes) and can be namespace-scoped or cluster-scoped. A set of out-of-the-box
58
58
roles are provided that offer reasonable default separation of responsibility depending on what
59
59
actions a client might want to perform. It is recommended that you use the
60
60
[Node](/docs/reference/access-authn-authz/node/) and
@@ -69,8 +69,8 @@ With authorization, it is important to understand how updates on one object may
69
69
other places. For instance, a user may not be able to create pods directly, but allowing them to
70
70
create a deployment, which creates pods on their behalf, will let them create those pods
71
71
indirectly. Likewise, deleting a node from the API will result in the pods scheduled to that node
72
-
being terminated and recreated on other nodes. The out of the box roles represent a balance
73
-
between flexibility and the common use cases, but more limited roles should be carefully reviewed
72
+
being terminated and recreated on other nodes. The out-of-the box roles represent a balance
73
+
between flexibility and common use cases, but more limited roles should be carefully reviewed
74
74
to prevent accidental escalation. You can make roles specific to your use case if the out-of-box ones don't meet your needs.
75
75
76
76
Consult the [authorization reference section](/docs/reference/access-authn-authz/authorization/) for more information.
@@ -104,7 +104,7 @@ reserved resources like memory, or to provide default limits when none are speci
104
104
### Controlling what privileges containers run with
105
105
106
106
A pod definition contains a [security context](/docs/tasks/configure-pod-container/security-context/)
107
-
that allows it to request access to running as a specific Linux user on a node (like root),
107
+
that allows it to request access to run as a specific Linux user on a node (like root),
108
108
access to run privileged or access the host network, and other controls that would otherwise
109
109
allow it to run unfettered on a hosting node. [Pod security policies](/docs/concepts/policy/pod-security-policy/)
110
110
can limit which users or service accounts can provide dangerous security context settings. For example, pod security policies can limit volume mounts, especially `hostPath`, which are aspects of a pod that should be controlled.
@@ -155,10 +155,10 @@ within their namespaces. Many of the supported [Kubernetes networking providers]
155
155
now respect network policy.
156
156
157
157
Quota and limit ranges can also be used to control whether users may request node ports or
158
-
loadbalanced services, which on many clusters can control whether those users applications
158
+
load-balanced services, which on many clusters can control whether those users applications
159
159
are visible outside of the cluster.
160
160
161
-
Additional protections may be available that control network rules on a perplugin or per
161
+
Additional protections may be available that control network rules on a per-plugin or per-
162
162
environment basis, such as per-node firewalls, physically separating cluster nodes to
163
163
prevent cross talk, or advanced networking policy.
164
164
@@ -169,15 +169,15 @@ By default these APIs are accessible by pods running on an instance and can cont
169
169
credentials for that node, or provisioning data such as kubelet credentials. These credentials
170
170
can be used to escalate within the cluster or to other cloud services under the same account.
171
171
172
-
When running Kubernetes on a cloud platform limit permissions given to instance credentials, use
172
+
When running Kubernetes on a cloud platform, limit permissions given to instance credentials, use
173
173
[network policies](/docs/tasks/administer-cluster/declare-network-policy/) to restrict pod access
174
174
to the metadata API, and avoid using provisioning data to deliver secrets.
175
175
176
176
### Controlling which nodes pods may access
177
177
178
178
By default, there are no restrictions on which nodes may run a pod. Kubernetes offers a
179
179
[rich set of policies for controlling placement of pods onto nodes](/docs/concepts/scheduling-eviction/assign-pod-node/)
180
-
and the [taintbased pod placement and eviction](/docs/concepts/scheduling-eviction/taint-and-toleration/)
180
+
and the [taint-based pod placement and eviction](/docs/concepts/scheduling-eviction/taint-and-toleration/)
181
181
that are available to end users. For many clusters use of these policies to separate workloads
182
182
can be a convention that authors adopt or enforce via tooling.
183
183
@@ -223,8 +223,9 @@ do not use.
223
223
The shorter the lifetime of a secret or credential the harder it is for an attacker to make
224
224
use of that credential. Set short lifetimes on certificates and automate their rotation. Use
225
225
an authentication provider that can control how long issued tokens are available and use short
226
-
lifetimes where possible. If you use service account tokens in external integrations, plan to
227
-
rotate those tokens frequently. For example, once the bootstrap phase is complete, a bootstrap token used for setting up nodes should be revoked or its authorization removed.
226
+
lifetimes where possible. If you use service-account tokens in external integrations, plan to
227
+
rotate those tokens frequently. For example, once the bootstrap phase is complete, a bootstrap
228
+
token used for setting up nodes should be revoked or its authorization removed.
228
229
229
230
### Review third party integrations before enabling them
230
231
@@ -246,7 +247,8 @@ and may grant an attacker significant visibility into the state of your cluster.
246
247
your backups using a well reviewed backup and encryption solution, and consider using full disk
247
248
encryption where possible.
248
249
249
-
Kubernetes supports [encryption at rest](/docs/tasks/administer-cluster/encrypt-data/), a feature introduced in 1.7, and beta since 1.13. This will encrypt `Secret` resources in etcd, preventing
250
+
Kubernetes supports [encryption at rest](/docs/tasks/administer-cluster/encrypt-data/), a feature
251
+
introduced in 1.7, and beta since 1.13. This will encrypt `Secret` resources in etcd, preventing
250
252
parties that gain access to your etcd backups from viewing the content of those secrets. While
251
253
this feature is currently beta, it offers an additional level of defense when backups
252
254
are not encrypted or an attacker gains read access to etcd.
0 commit comments