Git Product home page Git Product logo

kubeskoop's Introduction

KubeSkoop

kubeskoop license Go Report Card

English | 简体中文

Overview

KubeSkoop is a kubernetes networking diagnose tool for different CNI plug-ins and IAAS providers. KubeSkoop automatic construct network traffic graph of Pod in the Kubernetes cluster, monitoring and analysis of the kernel's critical path by eBPF, to resolve most of Kubernetes cluster network problems.

Key Features

One-Shot Diagnose For Network Broken

  • Diagnose in-cluster traffic between Pod,Service,Node and Ingress/Egress Traffic.
  • Cover whole linux network stack: Socket,Bridge,Veth,Netfilter,sysctls…
  • Support IAAS network probe for cloud providers.

In-Depth Kernel Monitor

  • eBPF seamless kernel monitor
  • CO-RE scripts on series kernel by BTF
  • export metrics to standard Prometheus metric API

Network Anomaly Event

  • support dozens of anomy scenes recognition
  • export anomy event to Grafana Loki

Quick Start

You can view the full documentation from the KubeSkoop.io.

One-Shot diagnose persistent network failure

Install KubeSkoop command

Through go install to install KubeSkoop cli:

go install github.com/alibaba/kubeskoop/cmd/skoop@latest

You can also run skoop command via docker run:

docker run -v ~/.kube:/root/.kube --rm kubeskoop/kubeskoop:latest skoop

One-Shot Diagnose

$ skoop -s 172.18.0.4 -d 10.96.0.10 -p 53 --http # Execute the diagnostic command, specify the src,dst, and use --http to provide the diagnostic result through the local web service
I0118 11:43:23.383446    6280 web.go:97] http server listening on http://127.0.0.1:8080 # After the diagnosis is completed, a link to the diagnosis result will be output

or via docker run:

$ docker run -p 8080:8080 -v ~/.kube:/root/.kube kubeskoop/kubeskoop:latest skoop -s 172.18.0.4 -d 10.96.0.10 -p 53 --http # Execute the diagnostic command, specify the src,dst, and use --http to provide the diagnostic result through the local web service
I0118 11:43:23.383446    6280 web.go:97] http server listening on http://127.0.0.1:8080 # After the diagnosis is completed, a link to the diagnosis result will be output

Open the diagnosis result http://127.0.0.1:8080 through browser:
diagnose_web

Monitor network jitter and bottlenecks

Install monitor components

The KubeSkoop exporter bundles with Prometheus, Grafana, and Loki can be quickly deployed in a Kubernetes cluster by following these steps:

kubectl apply -f https://raw.githubusercontent.com/alibaba/kubeskoop/main/deploy/skoopbundle.yaml

Confirm that the installation is complete and obtain access through the following steps:

# View the status of KubeSkoop exporter
kubectl get pod -n kubeskoop -l app=kubeskoop-exporter -o wide
# View the status of Probe collection probes
kubectl get --raw /api/v1/namespaces/kubeskoop/pods/kubeskoop-exporter-t4d9m:9102/proxy/status |jq .
# Obtain the entrance of Prometheus service, which is exposed by NodePort by default
kubectl get service -n kubeskoop prometheus-service -o wide
# Obtain the access entry of the Grafana console, which is exposed by NodePort by default
kubectl get service -n kubeskoop grafana -o wide

Note: skoopbundle.yaml starts with a minimal copy, not suitable for production environments

network performance analysis

Open the NodePort Service of grafana on web browser, open the network monitoring page, and check the water level of each monitor item corresponding to the time point of the performance problem. For example:
grafana_performance

network jitter & anomy event analysis

Open the NodePort Service of grafana on web browser, open the Loki page, check the events corresponding to the time point of network jitter and the water level corresponding to the network monitoring page. grafana_performance

Contributing

Feel free to open issues and pull requests. Any feedback is much appreciated!

Contact

  • DingTalk Group ID(26720020148)

License

Most source code in KubeSkoop which running on userspace are licensed under the Apache License, Version 2.0.
The BPF code in /bpf directory are licensed under the GPL v2.0 to compat with Linux kernel helper functions.

kubeskoop's People

Contributors

bswang avatar lyt99 avatar chickenpretty avatar kyle596 avatar dependabot[bot] avatar zmquan avatar

Watchers

 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.