kubectl-flame

module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: Apache-2.0

README

kubectl flame 🔥

A kubectl plugin that allows you to profile production applications with low-overhead by generating FlameGraphs

Running kubectlf-flame does not require any modification to existing pods.

Table of Contents

Requirements

  • Currently, only Java applications are supported. (Golang support coming soon!)
  • Kubernetes cluster that use Docker as the container runtime (tested on GKE, EKS and AKS)

Usage

Profiling Kubernetes Pod

In order to profile pod mypod for 1 minute and save the flamegraph as /tmp/flamegraph.svg run:

kubectl flame mypod -t 1m -f /tmp/flamegraph.svg
Profiling Alpine based container

Profiling alpine based containers require using --alpine flag:

kubectl flame mypod -t 1m -f /tmp/flamegraph.svg --alpine
Profiling sidecar container

Pods that contains more than one container require specifying the target container as an argument:

kubectl flame mypod -t 1m -f /tmp/flamegraph.svg mycontainer

Installing

Pre-built binaries

See the release page for the full list of pre-built assets.

How it works

kubectl-flame launch a Kubernetes Job on the same node as the target pod. Under the hood kubectl-flame use async-profiler in order to generate flame graphs for Java applications. Interaction with the target JVM is done via a shared /tmp folder. Other languages support (such as the upcoming Golang support) will be based on ebpf profiling.

Contribute

Please refer to the contributing.md file for information about how to get involved. We welcome issues, questions, and pull requests.

Maintainers

License

This project is licensed under the terms of the Apache 2.0 open source license. Please refer to LICENSE for the full terms.

Directories

Path Synopsis
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
details
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
profiler
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
cli
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
cmd
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
cmd/data
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
cmd/handler
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
cmd/kubernetes
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.
: Copyright Verizon Media : Licensed under the terms of the Apache 2.0 License.

Jump to

Keyboard shortcuts

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