#!/bin/bash set -e echo "Starting Network Benchmark Between Nodes..." echo "" # Deploy iperf3 server on node-41 echo "Deploying iperf3 server on node-41..." cat </dev/null || true echo "" echo "==========================================" echo "Test 2: node-43 → node-41" echo "==========================================" kubectl run iperf3-client-43 \ --image=networkstatic/iperf3:latest \ --restart=Never \ --rm -i \ --overrides=' { "spec": { "nodeSelector": { "kubernetes.io/hostname": "talos-node-43" }, "securityContext": { "runAsNonRoot": true, "runAsUser": 1000, "seccompProfile": { "type": "RuntimeDefault" } }, "containers": [{ "name": "iperf3-client-43", "image": "networkstatic/iperf3:latest", "stdin": true, "tty": true, "command": ["iperf3", "-c", "iperf3-server", "-t", "10", "-P", "4"], "securityContext": { "allowPrivilegeEscalation": false, "capabilities": { "drop": ["ALL"] }, "runAsNonRoot": true, "runAsUser": 1000 } }] } }' 2>/dev/null || true echo "" echo "==========================================" echo "Test 3: node-44 → node-41" echo "==========================================" kubectl run iperf3-client-44 \ --image=networkstatic/iperf3:latest \ --restart=Never \ --rm -i \ --overrides=' { "spec": { "nodeSelector": { "kubernetes.io/hostname": "talos-node-44" }, "securityContext": { "runAsNonRoot": true, "runAsUser": 1000, "seccompProfile": { "type": "RuntimeDefault" } }, "containers": [{ "name": "iperf3-client-44", "image": "networkstatic/iperf3:latest", "stdin": true, "tty": true, "command": ["iperf3", "-c", "iperf3-server", "-t", "10", "-P", "4"], "securityContext": { "allowPrivilegeEscalation": false, "capabilities": { "drop": ["ALL"] }, "runAsNonRoot": true, "runAsUser": 1000 } }] } }' 2>/dev/null || true echo "" echo "==========================================" echo "Cleaning up..." kubectl delete pod iperf3-server -n default kubectl delete service iperf3-server -n default echo "" echo "Network benchmark complete!"