netperf

在k8s集群内创建netperf deployment

  1. [root@UR-20210425NAMA ~]# kubectl create deployment netperf --image=bytest-harbor.ur.com.cn/base-image/netperf:latestdeployment.apps/netperf created
  2. [root@UR-20210425NAMA ~]# kubectl scale deployment netperf --replicas=2
  3. deployment.apps/netperf scaled
  4. [root@UR-20210425NAMA ~]# kubectl get deployments.apps netperf
  5. NAME READY UP-TO-DATE AVAILABLE AGE
  6. netperf 0/2 2 0 23s
  7. [root@UR-20210425NAMA ~]#


image.png

iperf3

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

image.png
image.png
image.png
https://www.cnblogs.com/olda/p/14919308.html