groundnuty
8/15/2017 - 9:43 PM

tcpprobe for debuging kubernetes networking

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