kpture

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2021 License: BSD-3-Clause Imports: 1 Imported by: 0

README

Kpture, packet capture for k8s


Kpture is a set of software built to help capturing packet in Kubernetes environments.

Get Kpture

go get github.com/kpture/kpture

Install Kpture in your Kubernetes cluster

This will install a daemonset handling the packet capture on the node where the targets pod are living as well as proxy pod to reach the correct daemonset pod depending on the request.

You will need to know your containerd socket location as well as the containerd namespace the pod are living

$ ctr ns list
NAME   LABELS
k8s.io

$ kpture install
? Containerd socket location: /run/containerd/containerd.sock
? Containerd namespace: k8s.io

Check your installation

$ kubectl get pods -n kpture
NAME                            READY   STATUS    RESTARTS   AGE
kpture-ds-ztgxp                 1/1     Running   1          9h
kpture-proxy-7bb7f5c494-4hzxw   1/1     Running   1          9h

Start a capture

$ kpture -o out
? [Use arrows to move, space to select, <right> to all, <left> to none, type to filter]
  [x]  nging2-xc8zt
  [x]  nging-87ssj

Stop the capture by stopping the process Ctrl^c, each pcap file will be located on the output folder

$ ls out
nging-87ssj.pcap  nging2-xc8zt.pcap

Documentation

Overview

Copyright © 2021 Stephane Guillemot <kpture.git@gmail.com> All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  1. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  1. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL