All Projects → sysdiglabs → Kubectl Capture

sysdiglabs / Kubectl Capture

Licence: apache-2.0
A kubectl plugin which triggers a Sysdig capture

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Kubectl Capture

Kubectl Who Can
Show who has RBAC permissions to perform actions on different resources in Kubernetes
Stars: ✭ 432 (+554.55%)
Mutual labels:  kubectl
Kubie
A more powerful alternative to kubectx and kubens
Stars: ✭ 647 (+880.3%)
Mutual labels:  kubectl
Helm Docker
☸️ helm, gcloud, kubectl, jq
Stars: ✭ 41 (-37.88%)
Mutual labels:  kubectl
Gbt
Highly configurable prompt builder for Bash, ZSH and PowerShell written in Go.
Stars: ✭ 457 (+592.42%)
Mutual labels:  kubectl
Geodesic
🚀 Geodesic is a DevOps Linux Distro. We use it as a cloud automation shell. It's the fastest way to get up and running with a rock solid Open Source toolchain. ★ this repo! https://slack.cloudposse.com/
Stars: ✭ 629 (+853.03%)
Mutual labels:  kubectl
Kubectl Restart
A kubectl plugin to restart a pod
Stars: ✭ 19 (-71.21%)
Mutual labels:  kubectl
Fubectl
Reduces repetitive interactions with kubectl
Stars: ✭ 370 (+460.61%)
Mutual labels:  kubectl
Kubernetes Cheatsheet
This is Kubernetes Cheatsheet based on Kubernetes API 1.19 version.
Stars: ✭ 53 (-19.7%)
Mutual labels:  kubectl
Gcr.io mirror
all of the gcr.io docker image mirror
Stars: ✭ 650 (+884.85%)
Mutual labels:  kubectl
Kube Aliases
Kubernetes Aliases and Bash Functions
Stars: ✭ 40 (-39.39%)
Mutual labels:  kubectl
Krew Index
Plugin index for https://github.com/kubernetes-sigs/krew. This repo is for plugin maintainers.
Stars: ✭ 476 (+621.21%)
Mutual labels:  kubectl
Kubelogin
kubectl plugin for Kubernetes OpenID Connect authentication (kubectl oidc-login)
Stars: ✭ 495 (+650%)
Mutual labels:  kubectl
Colossus
Colossus — An example microservice architecture for Kubernetes using Bazel, Go, Java, Docker, Kubernetes, Minikube, Gazelle, gRPC, Prometheus, Grafana, and more
Stars: ✭ 917 (+1289.39%)
Mutual labels:  kubectl
Fish Kubectl Completions
kubectl completions for fish shell
Stars: ✭ 453 (+586.36%)
Mutual labels:  kubectl
Bitnami Docker Kubectl
Bitnami Docker Image for Kubectl
Stars: ✭ 50 (-24.24%)
Mutual labels:  kubectl
Webkubectl
Run kubectl command in Web Browser.
Stars: ✭ 390 (+490.91%)
Mutual labels:  kubectl
Rakkess
Review Access - kubectl plugin to show an access matrix for k8s server resources
Stars: ✭ 751 (+1037.88%)
Mutual labels:  kubectl
Kauthproxy
Local authentication proxy for Kubernetes Dashboard (kubectl auth-proxy)
Stars: ✭ 54 (-18.18%)
Mutual labels:  kubectl
Docker Kubectl
Containerized Kubernetes kubectl
Stars: ✭ 52 (-21.21%)
Mutual labels:  kubectl
K8s Utils
Kubernetes Utility / Helper Scripts
Stars: ✭ 33 (-50%)
Mutual labels:  kubectl

Kubectl Sysdig Capture plugin

Sysdig is a powerful open source tool for container troubleshooting, performance tunning and security investigation.

This repository implements a kubectl plugin which triggers a capture in the underlying host which is running a pod. A capture file is created for a duration of time and is download locally in order to use it with Sysdig Inspect.

Installing

In order to use this plugin, just copy the kubectl-capture to your PATH, and ensure it has execution permissions.

You can verify its installation using kubectl:

$ kubectl plugin list
The following kubectl-compatible plugins are available:

/usr/local/bin/kubectl-capture

In this case is installed into /usr/local/bin, but will work with another location listed in PATH.

Getting started

Once you have the kubectl plugin installed, you can start taking captures:

$ kubectl capture nginx-78f5d695bd-bcbd8
Sysdig is starting to capture system calls:

Node: gke-sysdig-work-default-pool-e35da3a1-m8vp
Pod: nginx-78f5d695bd-bcbd8
Duration: 30 seconds
Parameters for Sysdig: -S -M 30 -pk -z -w /capture-nginx-78f5d695bd-bcbd8-1550246926.scap.gz

The capture has been downloaded to your hard disk at:
~/captures/capture-nginx-78f5d695bd-bcbd8-1550246926.scap.gz

And then, you can start troubleshooting with Sysdig Inspect.

Extra initialization time

When the capture container is being spinned, it takes some time to compile the Sysdig Kernel module and start to capture system calls. You can check the logs of the Sysdig Capture Pod if you need to know with accuracy when Sysdig starts to capture.

Parameters

There are a few parameters for this plugin:

Flag Description
-ns or --namespace The namespace scope of the target Pod
--ebpf Use eBPF probe instead of kernel module for capturing syscalls

Aditionally, all the flags for the sysdig cli tool are supported. You can check more of these parameters in its documentation.

Cleanup

You can uninstall this plugin from kubectl by simply removing it from your PATH:

$ rm /usr/local/bin/kubectl-capture
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].