0

我试图限制 minikube 的带宽,我试图限制 cni 配置的带宽,但没有任何改变。我在 minikube 中启用了 calico:

minikube start --network-plugin=cni --cni=calico

这是我的配置文件:

kind: ConfigMap
apiVersion: v1
metadata:
  name: calico-config
  namespace: kube-system
data:
  typha_service_name: "none"
  calico_backend: "vxlan"

  veth_mtu: "0"

  cni_network_config: |-
    {
      "name": "k8s-pod-network",
      "cniVersion": "0.3.1",
      "plugins": [
        {
          "type": "calico",
          "log_level": "info",
          "log_file_path": "/var/log/calico/cni/cni.log",
          "datastore_type": "kubernetes",
          "nodename": "__KUBERNETES_NODE_NAME__",
          "mtu": __CNI_MTU__,
          "ipam": {
              "type": "calico-ipam"
          },
          "policy": {
              "type": "k8s"
          },
          "kubernetes": {
              "kubeconfig": "__KUBECONFIG_FILEPATH__"
          }
        },
        {
          "type": "portmap",
          "snat": true,
          "capabilities": {"portMappings": true}
        },
        {
          "type": "bandwidth",
          "capabilities": {"bandwidth": true}
          "ingressRate": 1000,
          "ingressBurst": 1000,
          "egressRate": 1000,
          "egressBurst": 1000
        }
      ]
    }

我还尝试使用带有以下命令的 Wondershaper 通过 minikube 限制带宽:

minikube ssh
./wondershaper -a eth0 -u 4096 -d 8192

但我收到以下错误:

找不到设备“ifb0”

而且似乎只有出口流量受到限制。

4

0 回答 0