command
module
Version:
v0.2.0
Opens a new window with list of versions in this module.
Published: Mar 10, 2025
License: Apache-2.0
Opens a new window with license information.
Imports: 30
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
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
-
Install Krew using its installation
guide.
-
Run kubectl krew install pods-on
.
-
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.
-
go install github.com/ahmetb/kubectl-pods_on@latest
-
Add $HOME/go/bin
to your PATH
.
-
Run kubectl pods-on
!
License
Distributed as-is under Apache 2.0. See LICENSE.
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.