Skip to content

Commit 6126c42

Browse files
authored
Merge pull request #22683 from MikeSpreitzer/doc-health-for-strangers
Document the health-for-strangers workaround
2 parents 3b47114 + 499d0f4 commit 6126c42

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

content/en/docs/concepts/cluster-administration/flow-control.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,31 @@ are built in and may not be overwritten:
162162
that only matches the `catch-all` FlowSchema will be rejected with an HTTP 429
163163
error.
164164

165+
## Health check concurrency exemption
166+
167+
The suggested configuration gives no special treatment to the health
168+
check requests on kube-apiservers from their local kubelets --- which
169+
tend to use the secured port but supply no credentials. With the
170+
suggested config, these requests get assigned to the `global-default`
171+
FlowSchema and the corresponding `global-default` priority level,
172+
where other traffic can crowd them out.
173+
174+
If you add the following additional FlowSchema, this exempts those
175+
requests from rate limiting.
176+
177+
{{< caution >}}
178+
179+
Making this change also allows any hostile party to then send
180+
health-check requests that match this FlowSchema, at any volume they
181+
like. If you have a web traffic filter or similar external security
182+
mechanism to protect your cluster's API server from general internet
183+
traffic, you can configure rules to block any health check requests
184+
that originate from outside your cluster.
185+
186+
{{< /caution >}}
187+
188+
{{< codenew file="priority-and-fairness/health-for-strangers.yaml" >}}
189+
165190
## Resources
166191
The flow control API involves two kinds of resources.
167192
[PriorityLevelConfigurations](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#prioritylevelconfiguration-v1alpha1-flowcontrol-apiserver-k8s-io)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: flowcontrol.apiserver.k8s.io/v1alpha1
2+
kind: FlowSchema
3+
metadata:
4+
name: health-for-strangers
5+
spec:
6+
matchingPrecedence: 1000
7+
priorityLevelConfiguration:
8+
name: exempt
9+
rules:
10+
- nonResourceRules:
11+
- nonResourceURLs:
12+
- "/healthz"
13+
- "/livez"
14+
- "/readyz"
15+
verbs:
16+
- "*"
17+
subjects:
18+
- kind: Group
19+
group:
20+
name: system:unauthenticated

0 commit comments

Comments
 (0)