Coder Social home page Coder Social logo

caiobegotti / pod-dive Goto Github PK

View Code? Open in Web Editor NEW
57.0 3.0 7.0 169 KB

A kubectl plugin to dive into your Kubernetes nodes pods, and inspect them.

License: Apache License 2.0

Makefile 24.03% Go 75.97%
k8s-sig-cli krew-plugin kubectl-plugins kubernetes kubernetes-nodes-workloads client-go

pod-dive's Introduction

Pod dive

dive into kubernetes nodes workloads

A kubectl Krew plugin to dive into your Kubernetes nodes pods, and inspect them.

Icon art made by Smashicons from Flaticon. We had one before Krew itself, go figure.

Quick Start

If you don't use Krew to manage kubectl plugins you can simply download the binary here and put it in your PATH.

kubectl krew install pod-dive
kubectl pod-dive

Why use it

It's much faster than running multiple kubectl commands and having to scroll up and down to look for critical pod info.

What does it look like

$ kubectl pod-dive --help
Dives into a node after the desired pod and returns data associated
with the pod no matter where it is running, such as its origin workload,
namespace, the node where it is running and its node pod siblings, as
well basic health status of it all.

The purpose is to have meaningful pod info at a glance without needing to
run multiple kubectl commands to see what else is running next to your
pod in a given node inside a huge cluster, because sometimes all
you've got from an alert is the pod name.

Usage:
  pod-dive [pod name] [flags]

Examples:

Cluster-wide dive after a pod
$ kubectl pod-dive thanos-store-0

Restricts the dive to a namespace (faster in big clusters)
$ kubectl pod-dive elasticsearch-curator-1576112400-97htk -n logging
$ kubectl pod-dive kafka-operator-kafka-0
[node]      gke-staging-default-pool-acca72c6-klsn [ready]
[namespace]  ├─┬ kafka
[type]       │ └─┬ statefulset
[workload]   │   └─┬ kafka-operator-kafka [3 replicas]
[pod]        │     └─┬ kafka-operator-kafka-0 [pending]
[containers] │       ├── kafka [1 restart]
             │       ├── tls-sidecar [0 restarts]
             │       ├── vault-renewer [2 restarts]
             │       ├── vault-authenticator [init, 0 restarts]
             │       └── kafka-init [init, 0 restarts]
            ...
[siblings]   ├── cassandra-0
             ├── debug-b58f6f7f8-hbfw5
             ├── ignite-memory-web-agent-cc75c9987-nfh6p
             ├── jaeger-agent-daemonset-gmhm7
             ├── jaeger-query-7dc45cfc9f-mzfg6
             ├── kafka-operator-zookeeper-0
             ├── calico-node-dgvht
             ├── calico-typha-65bfd5544b-kjjjh
             ├── fluentd-gcp-scaler-6bc97c54b4-xftsm
             ├── fluentd-gcp-v3.1.1-b9zhf
             ├── ip-masq-agent-jtjxz
             ├── kube-dns-autoscaler-bb58c6784-j9n4h
             ├── kube-proxy-gke-staging-default-pool-acca72c6-klsn
             ├── metrics-server-v0.3.1-7b4d7f457-v6mfp
             ├── prometheus-to-sd-47n9b
             ├── vpa-recommender-8667dc8d75-9j4vl
             ├── fluent-bit-rj8cn
             ├── prometheus-operator-grafana-7f478cc944-g7rvw
             ├── prometheus-operator-kube-state-metrics-79486d7f6d-9r9q5
             ├── prometheus-operator-operator-777f86b5f7-njr9n
             └── prometheus-operator-prometheus-node-exporter-8w8tv

WAITING:
    kafka imagepullbackoff
TERMINATION:
    vault-renewer error (code 7)

pod-dive's People

Contributors

artmello avatar caiobegotti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pod-dive's Issues

Feature Request

This is an awesome plugin, thanks for contributing.

It would be great if it can accept a string as a pod name , and automatically search that string and match a pod name

kubectl pod-dive <pod name string to match>

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.