Skip to content

Commit 499d0f4

Browse files
committed
Tweaked wording and added codenew example re health-for-strangers
1 parent b2f5fbe commit 499d0f4

File tree

2 files changed

+36
-27
lines changed

2 files changed

+36
-27
lines changed

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

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ 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-
## Potentially interesting additional configuration
165+
## Health check concurrency exemption
166166

167167
The suggested configuration gives no special treatment to the health
168168
check requests on kube-apiservers from their local kubelets --- which
@@ -171,32 +171,21 @@ suggested config, these requests get assigned to the `global-default`
171171
FlowSchema and the corresponding `global-default` priority level,
172172
where other traffic can crowd them out.
173173

174-
Adding the following additional FlowSchema will cause those requests
175-
to be exempt from limiting. Unfortunately, any hostile party could
176-
submit requests matching this FlowSchema.
177-
178-
```yaml
179-
apiVersion: flowcontrol.apiserver.k8s.io/v1alpha1
180-
kind: FlowSchema
181-
metadata:
182-
name: health-for-strangers
183-
spec:
184-
matchingPrecedence: 1000
185-
priorityLevelConfiguration:
186-
name: exempt
187-
rules:
188-
- nonResourceRules:
189-
- nonResourceURLs:
190-
- "/healthz"
191-
- "/livez"
192-
- "/readyz"
193-
verbs:
194-
- "*"
195-
subjects:
196-
- kind: Group
197-
group:
198-
name: system:unauthenticated
199-
```
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" >}}
200189

201190
## Resources
202191
The flow control API involves two kinds of resources.
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)