Skip to content

Commit 320d290

Browse files
Add Traffic Shaping Annotations (#32549)
* Update _index.md * Update _index.md * Update _index.md * Update _index.md * Update _index.md
1 parent 955ed01 commit 320d290

File tree

1 file changed

+38
-0
lines changed
  • content/en/docs/reference/labels-annotations-taints

1 file changed

+38
-0
lines changed

content/en/docs/reference/labels-annotations-taints/_index.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,44 @@ Used on: Pod
168168
This annotation is used to set [Pod Deletion Cost](/docs/concepts/workloads/controllers/replicaset/#pod-deletion-cost)
169169
which allows users to influence ReplicaSet downscaling order. The annotation parses into an `int32` type.
170170

171+
### kubernetes.io/ingress-bandwidth
172+
173+
{{< note >}}
174+
Ingress traffic shaping annotation is an experimental feature.
175+
If you want to enable traffic shaping support, you must add the `bandwidth` plugin to your CNI configuration file (default `/etc/cni/net.d`) and
176+
ensure that the binary is included in your CNI bin dir (default `/opt/cni/bin`).
177+
{{< /note >}}
178+
179+
Example: `kubernetes.io/ingress-bandwidth: 10M`
180+
181+
Used on: Pod
182+
183+
You can apply quality-of-service traffic shaping to a pod and effectively limit its available bandwidth.
184+
Ingress traffic (to the pod) is handled by shaping queued packets to effectively handle data.
185+
To limit the bandwidth on a pod, write an object definition JSON file and specify the data traffic
186+
speed using `kubernetes.io/ingress-bandwidth` annotation. The unit used for specifying ingress
187+
rate is bits per second, as a [Quantity](/docs/reference/kubernetes-api/common-definitions/quantity/).
188+
For example, `10M` means 10 megabits per second.
189+
190+
### kubernetes.io/egress-bandwidth
191+
192+
{{< note >}}
193+
Egress traffic shaping annotation is an experimental feature.
194+
If you want to enable traffic shaping support, you must add the `bandwidth` plugin to your CNI configuration file (default `/etc/cni/net.d`) and
195+
ensure that the binary is included in your CNI bin dir (default `/opt/cni/bin`).
196+
{{< /note >}}
197+
198+
Example: `kubernetes.io/egress-bandwidth: 10M`
199+
200+
Used on: Pod
201+
202+
Egress traffic (from the pod) is handled by policing, which simply drops packets in excess of the configured rate.
203+
The limits you place on a pod do not affect the bandwidth of other pods.
204+
To limit the bandwidth on a pod, write an object definition JSON file and specify the data traffic
205+
speed using `kubernetes.io/egress-bandwidth` annotation. The unit used for specifying egress
206+
rate is bits per second, as a [Quantity](/docs/reference/kubernetes-api/common-definitions/quantity/).
207+
For example, `10M` means 10 megabits per second.
208+
171209
### beta.kubernetes.io/instance-type (deprecated)
172210

173211
{{< note >}} Starting in v1.17, this label is deprecated in favor of [node.kubernetes.io/instance-type](#nodekubernetesioinstance-type). {{< /note >}}

0 commit comments

Comments
 (0)