netperf
在k8s集群内创建netperf deployment
[root@UR-20210425NAMA ~]# kubectl create deployment netperf --image=bytest-harbor.ur.com.cn/base-image/netperf:latestdeployment.apps/netperf created
[root@UR-20210425NAMA ~]# kubectl scale deployment netperf --replicas=2
deployment.apps/netperf scaled
[root@UR-20210425NAMA ~]# kubectl get deployments.apps netperf
NAME READY UP-TO-DATE AVAILABLE AGE
netperf 0/2 2 0 23s
[root@UR-20210425NAMA ~]#
iperf3
[root@UR-20210425NAMA ~]# kubectl create deployment iperf3 --image=bytest-harbor.ur.com.cn/base-image/iperf3:latest
deployment.apps/iperf3 created
[root@UR-20210425NAMA ~]# kubectl scale deployment iperf3 --replicas=2
deployment.apps/iperf3 scaled
[root@UR-20210425NAMA ~]# kubectl get deployments.apps
NAME READY UP-TO-DATE AVAILABLE AGE
iperf3 0/2 2 0 17s
[root@UR-20210425NAMA ~]#
[root@UR-20210425NAMA ~]# kubectl exec -it iperf3-5f59cb985d-ql4rz bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl kubectl exec [POD] -- [COMMAND] instead.
root@iperf3-5f59cb985d-ql4rz:/# iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 172.27.64.153, port 49916
[ 5] local 172.27.188.153 port 5201 connected to 172.27.64.153 port 49922
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 88.6 MBytes 743 Mbits/sec
[ 5] 1.00-2.00 sec 86.2 MBytes 723 Mbits/sec
[ 5] 2.00-3.00 sec 84.3 MBytes 707 Mbits/sec
[ 5] 3.00-4.03 sec 44.9 MBytes 364 Mbits/sec
[ 5] 4.03-5.00 sec 72.0 MBytes 625 Mbits/sec
[ 5] 5.00-6.00 sec 57.4 MBytes 481 Mbits/sec
[ 5] 6.00-7.00 sec 85.8 MBytes 720 Mbits/sec
[ 5] 7.00-8.00 sec 73.0 MBytes 612 Mbits/sec
[ 5] 8.00-9.00 sec 40.7 MBytes 342 Mbits/sec
[ 5] 9.00-10.00 sec 64.9 MBytes 544 Mbits/sec
[ 5] 10.00-11.00 sec 69.0 MBytes 579 Mbits/sec
[ 5] 11.00-12.00 sec 34.4 MBytes 288 Mbits/sec
[ 5] 12.00-13.00 sec 69.2 MBytes 581 Mbits/sec
[ 5] 13.00-14.00 sec 86.1 MBytes 722 Mbits/sec
[ 5] 14.00-14.75 sec 67.2 MBytes 747 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate
[ 5] 0.00-14.75 sec 1024 MBytes 582 Mbits/sec receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
[root@UR-20210425NAMA ~]# kubectl get pod -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
iperf3-5f59cb985d-ql4rz 1/1 Running 0 7d3h 172.27.188.153 ur-scm-worker05 <none> <none>
iperf3-5f59cb985d-zgttz 1/1 Running 0 7d3h 172.27.64.153 ur-scm-worker01 <none> <none>
[root@UR-20210425NAMA ~]# kubectl exec -it iperf3-5f59cb985d-zgttz bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl kubectl exec [POD] -- [COMMAND] instead.
root@iperf3-5f59cb985d-zgttz:/# iperf3 -c 172.27.188.153 -b 1000MB -n 1GB
Connecting to host 172.27.188.153, port 5201
[ 5] local 172.27.64.153 port 49922 connected to 172.27.188.153 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 92.5 MBytes 776 Mbits/sec 321 77.3 KBytes
[ 5] 1.00-2.00 sec 86.6 MBytes 727 Mbits/sec 230 93.5 KBytes
[ 5] 2.00-3.00 sec 84.4 MBytes 708 Mbits/sec 207 94.9 KBytes
[ 5] 3.00-4.00 sec 41.0 MBytes 344 Mbits/sec 82 62.4 KBytes
[ 5] 4.00-5.00 sec 74.9 MBytes 628 Mbits/sec 266 65.1 KBytes
[ 5] 5.00-6.00 sec 57.9 MBytes 485 Mbits/sec 234 85.4 KBytes
[ 5] 6.00-7.00 sec 85.4 MBytes 716 Mbits/sec 203 36.6 KBytes
[ 5] 7.00-8.00 sec 73.1 MBytes 613 Mbits/sec 204 51.5 KBytes
[ 5] 8.00-9.00 sec 40.9 MBytes 343 Mbits/sec 119 70.5 KBytes
[ 5] 9.00-10.00 sec 65.0 MBytes 545 Mbits/sec 194 62.4 KBytes
[ 5] 10.00-11.00 sec 68.8 MBytes 577 Mbits/sec 176 48.8 KBytes
[ 5] 11.00-12.00 sec 34.5 MBytes 289 Mbits/sec 61 130 KBytes
[ 5] 12.00-13.00 sec 68.4 MBytes 574 Mbits/sec 202 51.5 KBytes
[ 5] 13.00-14.00 sec 87.8 MBytes 736 Mbits/sec 124 127 KBytes
[ 5] 14.00-14.72 sec 63.0 MBytes 739 Mbits/sec 120 59.6 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-14.72 sec 1.00 GBytes 584 Mbits/sec 2743 sender
[ 5] 0.00-14.75 sec 1024 MBytes 582 Mbits/sec receiver
iperf Done.
root@iperf3-5f59cb985d-zgttz:/#