Skip to content

Instantly share code, notes, and snippets.

@johananl
Last active January 24, 2019 21:46
Show Gist options
  • Save johananl/7f3cdb89130289e58e9634d5cdb41add to your computer and use it in GitHub Desktop.
Save johananl/7f3cdb89130289e58e9634d5cdb41add to your computer and use it in GitHub Desktop.
iperf on k8s
kubectl apply -f iperf.yaml
kubectl run -it iperf-client --image=quay.io/jlieb/iperf --restart=Never -- iperf -c <iperf-server-pod-ip>
FROM debian
RUN apt-get update && apt-get install -y iperf && apt-get clean
CMD exec /bin/bash -c "trap : TERM INT; sleep infinity & wait"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: iperf
labels:
app: iperf
spec:
replicas: 1
selector:
matchLabels:
app: iperf
template:
metadata:
labels:
app: iperf
spec:
containers:
- name: iperf
image: quay.io/jlieb/iperf
ports:
- containerPort: 5001
command: ["iperf"]
args: ["-s"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment