GithubHelp home page GithubHelp logo

ahmetb / kubectl-pods_on Goto Github PK

View Code? Open in Web Editor NEW
88.0 2.0 1.0 30 KB

kubectl plugin to query Pods by Node names or selectors

License: Apache License 2.0

Go 100.00%
kubectl-plugins kubectl kubectl-plugin

kubectl-pods_on's Introduction

kubectl pods-on

A kubectl plugin to query list of pods running on a Node (by name or Node label selector).

If you ever found yourself finding a list of Pods on a particular Node or a set of Nodes, you'll find this plugin useful.

Features

  • Query multiple Node names at the same time.
  • Specify Node selectors (instead of Node names) to query
  • Supports -o/--output=json|yaml|wide|jsonpath|go-template|... formats (just like kubectl)
  • Performance optimizations like parallel queries.
  • Runs fast on large clusters, as it employs different query strategies based on the cluster size.

Examples

  • List all pods running on a node (or more nodes):

    kubectl pods-on <node-name> [<node-name>...]
  • List all pods running on nodes with a specific label:

    kubectl pods-on pool=general
  • List all pods running on nodes that match a particular selector:

    kubectl pods-on "topology.kubernetes.io/zone in (us-west-1a, us-west-1b)"
  • A combination of both syntaxes (the results of each selector will be OR'ed):

    kubectl pods-on \
      "tier in (db, cache)" \
      "foo=bar"\
      node1.example.com

Installation

Install using Krew

  1. Install Krew using its installation guide.

  2. Run kubectl krew install pods-on.

  3. kubectl pods-on is ready to use!

Install using go (not recommended)

In this method, you will not receive any updates to the plugin unless you manually run go install again.

  1. go install github.com/ahmetb/kubectl-pods_on@latest
  2. Add $HOME/go/bin to your PATH.

  3. Run kubectl pods-on!

License

Distributed as-is under Apache 2.0. See LICENSE.

kubectl-pods_on's People

Contributors

ahmetb 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  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

Forkers

kalyann567

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.