Git Product home page Git Product logo

kube-node-tracer's Introduction

Kube Node Tracer

This is not an officially supported Google product.

Authored by: Richard Balfour (RichardBalfour)

Overview

Troubleshooting transient/ intermittent networking issues is a tedious process, oftentimes requiring packet trace collection and analysis to determine the root-cause. The container orchestration environment Kubernetes (K8s) poses another set of challenges due to its potential scale, ephemeral nature, and layers of abstraction.

The Kube Node Tracer aims to provide K8s users a tool to perform rolling packet captures on the host network namespace for nodes within a cluster for use in troubleshooting transient networking issues. To limit the impact on cluster resources, Kube Node Tracer automatically offloads packet capture files to a sink (ex. Google Cloud Storage) for later analysis.

Usage

Required fields

Kube Node Tracer requires Google Cloud Storage (GCS) bucket to act as a sink for the packet traces thus the following flag is required:

  • -b - GCS Bucket Name

Note: If using GKE the GCE VMs must have write permissions (scope) to the GCS bucket.

If running the Kube Node Tracer as a stand-alone container (ex. Docker) then the node name will need to be specified (See Deployment below):

  • -N - Node name (Note: This should be automatically retrieved from the metadata specs in DaemonSet when using K8)

Optional fields

This tool utilizes tcpdump to perform rotating packet captures on the node's primary interface thus the normal flags can be tuned based on requirements:

  • -s - Snap length (Default: 96 B)

  • -B - Buffer Size (Default: 1000 B)

  • -C - File Size (Default: 100 MB)

  • -W - File Count (Default: 100)

  • -f - Filter (Note: This is a wrapper around tcpdump filter)

  • -i - Interface (Default: Primary NIC)

  • -G - Rotate Seconds

Deployment

To build Kube Node Tracer simply run the following docker command to build an image using the Dockerfile:

docker build -t kube-node-tracer . 	

Kube Node Tracer should be deployed as priviled DaemonSet which operates in the host network namespace. See /examples for sample DaemonSet.

If runnung Kube Node Tracer as a stand-alone container using Docker the --network flag will neeed to be set to host as follows:

docker run -dt --network host --name <CONTAINER-NAME> kube-node-tracer -N <NODE-NAME> -b <GCS-BUCKET-NAME>

Contributing

See CONTRIBUTING.md for details.

License

Apache 2.0; see LICENSE for details.

Disclaimer

This project is not an official Google project. It is not supported by Google and Google specifically disclaims all warranties as to its quality, merchantability, or fitness for a particular purpose.

kube-node-tracer's People

Contributors

richardbalfour avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.