Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kubernetes: How to implement a Network ResourceQuota

I'm familiar with the Kubernetes quotas for CPU and memory usage. However, I'm envisaging a scenario in which certain containers are guaranteed to use a lot of network bandwidth, and I can't see any way of warning Kubernetes of this. (e.g. don't put two on the same machine, don't put too much else on this machine even if the other quotas are fine). How can I effect this sort of behaviour? For the purposes of the question I have full control of the cluster and am prepared to write code if necessary.

like image 594
Julian Birch Avatar asked Dec 23 '22 01:12

Julian Birch


1 Answers

The only thing you can do is to apply Support traffic shaping using kubernetes.io/ingress-bandwidth and kubernetes.io/egress-bandwidth annotations. It can only be applied to your PODS.

Example:

apiVersion: v1
kind: Pod
metadata:
  annotations:
    kubernetes.io/ingress-bandwidth: 1M
    kubernetes.io/egress-bandwidth: 1M
.. 

Also official k8s documentation gives link to bandwidth plugin. Try to apply in for your needs.

And read github related topic.

like image 196
Vit Avatar answered Jan 04 '23 01:01

Vit