Skip to content

Commit f68ee02

Browse files
committed
Fix small mistakes
Added some notes for the ports and shortened the motivation. Signed-off-by: Hannes Baum <[email protected]>
1 parent 6dff403 commit f68ee02

File tree

1 file changed

+17
-25
lines changed

1 file changed

+17
-25
lines changed

Standards/scs-0216-v1-high-security-setup.md

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,20 @@ track: KaaS
88
## Introduction
99

1010
A Kubernetes instance is provided as a cluster, which consists of a set of machines,
11-
so called nodes. These clusters are configured depending on the needs of its users, which
11+
so-called nodes. These clusters are configured depending on the needs of its users, which
1212
is possible due to the flexibility of Kubernetes.
1313
Due to the regular changes, there are always new security features to deploy and use in Kubernetes.
1414
Nevertheless, a provider (or even a customer) needs to take action in order to achieve a
1515
hardened, secure cluster due to the myriad of configurations possible. This is especially
1616
the case since Kubernetes ships with insecure features and configurations out of the box,
1717
which will need to be mitigated by an administrator with the proper knowledge.
18-
Hardened Kubernetes clusters are desirable regardless of the possible threat model, since
19-
higher security doesn't necessarily mean higher complexity in this case.
18+
Hardened, secure Kubernetes clusters are desirable regardless of the possible threat model,
19+
since higher security doesn't necessarily mean higher complexity in this case.
2020

2121
## Motivation
2222

23-
Kubernetes clusters are highly configurable to fit a wide array of use-cases and setups.
24-
This makes them flexible and scalable to a certain extent, which is probably also why they
25-
found such a wide adoption. But its also obvious, that security problems can arise if a
26-
cluster isn't configured properly to mitigate them.
23+
Kubernetes clusters are highly configurable, which also gives rise to different security
24+
problems, if the configuration isn't done properly.
2725
These security risks can potentially be exposed in many different parts of a cluster, e.g.
2826
different APIs, authorization and authentication procedures or even Pod privilege mechanisms.
2927
In order to mitigate these problems, different hardening and prevention steps and mechanisms
@@ -65,20 +63,15 @@ Nevertheless, some endpoints of internal components could be/will be exposed wit
6563
encryption, which could lead to weakpoints in the system.
6664
A list of the default service endpoints can be seen in the following table
6765

68-
Protocol | Port Range | Purpose
69-
— | — | —
70-
TCP | 6443- | Kubernetes API Server
71-
TCP | 2379-2380 | etcd server client API
72-
TCP | 10250 | Kubelet API
73-
TCP | 10251 | kube-scheduler
74-
TCP | 10252 | kube-controller-manager
75-
TCP | 10255 | Read-Only Kubelet API
76-
77-
Protocol | Port Range | Purpose
78-
— | — | —
79-
TCP | 10250 | Kubelet API
80-
TCP | 10255 | Read-Only Kubelet API
81-
TCP | 30000-32767 | NodePort Services
66+
| Protocol | Port Range | Purpose | Notes |
67+
|----------|-------------|-------------------------|-----------------------------------------------------------------------------------------|
68+
| TCP | 6443* | Kubernetes API Server | - |
69+
| TCP | 2379-2380 | etcd server client API | - |
70+
| TCP | 10250 | Kubelet API | - |
71+
| TCP | 10251/10259 | kube-scheduler | 10251 could be insecure before 1.13, after that only the secure port 10259 is available |
72+
| TCP | 10252/10257 | kube-controller-manager | 10252 could be insecure before 1.13, after that only the secure port 10257 is available |
73+
| TCP | 10255 | Read-Only Kubelet API | HTTP port for GET requests |
74+
| TCP | 30000-32767 | NodePort Services | Service endpoints, could be HTTP |
8275

8376
#### Authentication and Authorization
8477

@@ -101,7 +94,7 @@ could manipulate resources that are managed with the Kubelet.
10194

10295
To disable anonymous requests, the Kubelet should be started with `--anonymous-auth=false`.
10396
Authentication can be provided either through x509 client certificates or API bearer tokens.
104-
How to setup both approaches can be found in the [Kubelet Authentication and Authorization](https://kubernetes.io/docs/reference/access-authn-authz/kubelet-authn-authz/).
97+
How to set up both approaches can be found in the [Kubelet Authentication and Authorization](https://kubernetes.io/docs/reference/access-authn-authz/kubelet-authn-authz/).
10598

10699
Kubelet authorization is set to `AlwaysAllow` as a default mode. This can be quite problematic,
107100
since all authenticated users can do all actions. To mitigate this, it is possible to delegate
@@ -118,9 +111,8 @@ Multiple policies can be setup to limit and control the capabilities of workload
118111
especially in order to prevent malicious actors from exploiting obvious faults or even to
119112
just prevent incorrectly configured workloads from overusing resources.
120113

121-
An easy way to do this would be Resource Limiting on a cluster. This can be done on a per
122-
namespace basis and can prevent the overuse of resources or even prevent the creation of
123-
too many pods, services or volumes.
114+
An easy way to do this would be Resource Limiting on a cluster. This can be done on a per-namespace
115+
basis and can prevent the overuse of resources or even prevent the creation of too many pods, services or volumes.
124116

125117
It is also possible to change the security context of a pod, which changes different settings of a pod, like
126118
its underlying Linux user, the access to the host network or different other controls that

0 commit comments

Comments
 (0)