Google Kubernetes Engine 是否支持自定义节点映像 and/or 10Gbps 网络?

Does Google Kubernetes Engine support custom node images and/or 10Gbps networking?

我们已经建立了一些运行良好的私有 GCP GKE 集群。每个当前都有一个包含 2 个 ContainerOS 节点的节点池。

我们在网络中还有一个非 K8s 计算引擎,它是一个 FreeBSD NFS 服务器,配置为 10Gbps 网络。

当我们登录到 K8s 节点时,它们似乎不支持开箱即用的 10Gbps 网络。我们怀疑这一点,因为 "large-receive-offload" 似乎在网络接口中被关闭。

我们已经在 Kubernetes 集群中为来自该文件服务器的共享创建了持久存储声明,我们希望它们支持 10Gbps 网络,但担心它默认限制为 1Gbps。

Google 似乎只为其节点池的映像提供了几个选项(ContainerOS 或 Ubuntu)。这通过他们的 GCP 界面以及集群创建命令受到限制。

我的问题是:

如有任何帮助,我们将不胜感激。

  • Is it at all possible to support 10Gbps networking somehow in GCP GKE clusters?

是的,GKE 原生支持开箱即用的 10GE 连接,就像 Compute Engine 实例一样,但它不支持自定义节点映像。

测试速度限制的一个好方法是使用 iperf3.

我用默认设置创建了一个 GKE 实例来测试连接速度。

我还创建了一个名为 Debian9-Client 的 Compute Engine VM,它将托管我们的测试,如下所示:

  • 首先我们用iperf3服务器设置我们的虚拟机运行ning:
❯ gcloud compute ssh debian9-client-us --zone "us-central1-a

user@debian9-client-us:~$ iperf3 -s -p 7777

-----------------------------------------------------------
Server listening on 7777
-----------------------------------------------------------
  • 然后我们从 POD 转移到我们的 GKE 运行 测试:
❯ k get nodes
NAME                                 STATUS   ROLES    AGE   VERSION
gke-cluster-1-pool-1-4776b3eb-16t7   Ready    <none>   16m   v1.15.7-gke.23
gke-cluster-1-pool-1-4776b3eb-mp84   Ready    <none>   16m   v1.15.7-gke.23

❯ kubectl run -i --tty --image ubuntu test-shell -- /bin/bash

root@test-shell-845c969686-6h4nl:/# apt update && apt install iperf3 -y

root@test-shell-845c969686-6h4nl:/# iperf3 -c 10.128.0.5 -p 7777

Connecting to host 10.128.0.5, port 7777
[  4] local 10.8.0.6 port 60946 connected to 10.128.0.5 port 7777
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec   661 MBytes  5.54 Gbits/sec  5273    346 KBytes       
[  4]   1.00-2.00   sec  1.01 GBytes  8.66 Gbits/sec  8159    290 KBytes       
[  4]   2.00-3.00   sec  1.08 GBytes  9.31 Gbits/sec  6381    158 KBytes       
[  4]   3.00-4.00   sec  1.00 GBytes  8.62 Gbits/sec  9662    148 KBytes       
[  4]   4.00-5.00   sec  1.08 GBytes  9.27 Gbits/sec  8892    286 KBytes       
[  4]   5.00-6.00   sec  1.11 GBytes  9.51 Gbits/sec  6136    532 KBytes       
[  4]   6.00-7.00   sec  1.09 GBytes  9.32 Gbits/sec  7150    755 KBytes       
[  4]   7.00-8.00   sec   883 MBytes  7.40 Gbits/sec  6973    177 KBytes       
[  4]   8.00-9.00   sec  1.04 GBytes  8.90 Gbits/sec  9104    212 KBytes       
[  4]   9.00-10.00  sec  1.08 GBytes  9.29 Gbits/sec  4993    594 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  9.99 GBytes  8.58 Gbits/sec  72723             sender
[  4]   0.00-10.00  sec  9.99 GBytes  8.58 Gbits/sec                  receiver

iperf Done.

本次测试的平均传输速率为 8.58Gits/秒,证明集群节点默认为 运行 10Gbps 以太网。

如果我能进一步帮助你,请在评论中告诉我。