Skip to content

Instantly share code, notes, and snippets.

@groundnuty
Created August 15, 2017 21:43
Show Gist options
  • Save groundnuty/6b33c53e506e6cefd200135246f857fb to your computer and use it in GitHub Desktop.
Save groundnuty/6b33c53e506e6cefd200135246f857fb to your computer and use it in GitHub Desktop.
tcpprobe for debuging kubernetes networking
# tcpprobe https://wiki.linuxfoundation.org/networking/tcpprobe
# use: apt install module-init-tools
# to install modprobe
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
generation: 1
labels:
run: ipref
name: ipref
namespace: default
spec:
replicas: 12 # we have 10 nodes in a cluster hence 12 replicas
selector:
matchLabels:
run: ipref
template:
metadata:
labels:
run: ipref
spec:
containers:
- command:
- sleep
- "infinity"
image: networkstatic/iperf3
imagePullPolicy: Always
name: ipref
resources: {}
securityContext:
capabilities:
add:
- CAP_ALL
privileged: true
volumeMounts:
- mountPath: /dev
name: dev
- mountPath: /lib/modules
name: modules
volumes:
- name: dev
hostPath:
# directory location on host
path: /dev
- name: modules
hostPath:
# directory location on host
path: /lib/modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment