@@ -8,8 +8,8 @@ weight: 90
8
8
9
9
<!-- overview -->
10
10
11
- The Kubernetes API server is the main point of entry to a cluster for external parties
12
- (users and services) interacting with it.
11
+ The Kubernetes API server is the main point of entry to a cluster for external parties
12
+ (users and services) interacting with it.
13
13
14
14
As part of this role, the API server has several key built-in security controls, such as
15
15
audit logging and {{< glossary_tooltip text="admission controllers" term_id="admission-controller" >}}.
@@ -48,13 +48,13 @@ API server. However, the Pod still runs on the node. For more information, refer
48
48
### Mitigations {#static-pods-mitigations}
49
49
50
50
- Only [ enable the kubelet static Pod manifest functionality] ( /docs/tasks/configure-pod-container/static-pod/#static-pod-creation )
51
- if required by the node.
51
+ if required by the node.
52
52
- If a node uses the static Pod functionality, restrict filesystem access to the static Pod manifest directory
53
- or URL to users who need the access.
53
+ or URL to users who need the access.
54
54
- Restrict access to kubelet configuration parameters and files to prevent an attacker setting
55
- a static Pod path or URL.
55
+ a static Pod path or URL.
56
56
- Regularly audit and centrally report all access to directories or web storage locations that host
57
- static Pod manifests and kubelet configuration files.
57
+ static Pod manifests and kubelet configuration files.
58
58
59
59
## The kubelet API {#kubelet-api}
60
60
@@ -73,7 +73,7 @@ Direct access to the kubelet API is not subject to admission control and is not
73
73
by Kubernetes audit logging. An attacker with direct access to this API may be able to
74
74
bypass controls that detect or prevent certain actions.
75
75
76
- The kubelet API can be configured to authenticate requests in a number of ways.
76
+ The kubelet API can be configured to authenticate requests in a number of ways.
77
77
By default, the kubelet configuration allows anonymous access. Most Kubernetes providers
78
78
change the default to use webhook and certificate authentication. This lets the control plane
79
79
ensure that the caller is authorized to access the ` nodes ` API resource or sub-resources.
@@ -86,7 +86,7 @@ The default anonymous access doesn't make this assertion with the control plane.
86
86
such as by monitoring services.
87
87
- Restrict access to the kubelet port. Only allow specified and trusted IP address
88
88
ranges to access the port.
89
- - Ensure that [ kubelet authentication] ( /docs/reference/access-authn-authz/kubelet-authn-authz/#kubelet-authentication ) .
89
+ - Ensure that [ kubelet authentication] ( /docs/reference/access-authn-authz/kubelet-authn-authz/#kubelet-authentication ) .
90
90
is set to webhook or certificate mode.
91
91
- Ensure that the unauthenticated "read-only" Kubelet port is not enabled on the cluster.
92
92
@@ -108,7 +108,7 @@ cluster admin rights by accessing cluster secrets or modifying access rules. Eve
108
108
elevating their Kubernetes RBAC privileges, an attacker who can modify etcd can retrieve any API object
109
109
or create new workloads inside the cluster.
110
110
111
- Many Kubernetes providers configure
111
+ Many Kubernetes providers configure
112
112
etcd to use mutual TLS (both client and server verify each other's certificate for authentication).
113
113
There is no widely accepted implementation of authorization for the etcd API, although
114
114
the feature exists. Since there is no authorization model, any certificate
@@ -124,10 +124,9 @@ that are only used for health checking can also grant full read and write access
124
124
- Consider restricting access to the etcd port at a network level, to only allow access
125
125
from specified and trusted IP address ranges.
126
126
127
-
128
127
## Container runtime socket {#runtime-socket}
129
128
130
- On each node in a Kubernetes cluster, access to interact with containers is controlled
129
+ On each node in a Kubernetes cluster, access to interact with containers is controlled
131
130
by the container runtime (or runtimes, if you have configured more than one). Typically,
132
131
the container runtime exposes a Unix socket that the kubelet can access. An attacker with
133
132
access to this socket can launch new containers or interact with running containers.
@@ -139,12 +138,12 @@ control plane components.
139
138
140
139
### Mitigations {#runtime-socket-mitigations}
141
140
142
- - Ensure that you tightly control filesystem access to container runtime sockets.
143
- When possible, restrict this access to the ` root ` user.
141
+ - Ensure that you tightly control filesystem access to container runtime sockets.
142
+ When possible, restrict this access to the ` root ` user.
144
143
- Isolate the kubelet from other components running on the node, using
145
- mechanisms such as Linux kernel namespaces.
144
+ mechanisms such as Linux kernel namespaces.
146
145
- Ensure that you restrict or forbid the use of [ ` hostPath ` mounts] ( /docs/concepts/storage/volumes/#hostpath )
147
- that include the container runtime socket, either directly or by mounting a parent
148
- directory. Also ` hostPath ` mounts must be set as read-only to mitigate risks
149
- of attackers bypassing directory restrictions.
146
+ that include the container runtime socket, either directly or by mounting a parent
147
+ directory. Also ` hostPath ` mounts must be set as read-only to mitigate risks
148
+ of attackers bypassing directory restrictions.
150
149
- Restrict user access to nodes, and especially restrict superuser access to nodes.
0 commit comments