kubectl-nearby

command module
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: MIT Imports: 17 Imported by: 0

README

kubectl nearby

A kubectl plugin that lists:

  • pods on the same node as a given pod
  • nodes in the same zone as a given node

Installation

  1. Download the latest version from the Releases page.
  2. Place the kubectl-nearby binary in a directory that's included in your $PATH. For example: /usr/local/bin.

Usage

Nearby Pods

To list pods on the same node as a given pod:

kubectl nearby pods POD_NAME [OPTIONS]

By default, the output only shows pods from the same namespace as the given pod.

Options:

  • --namespace NAMESPACE - The namespace for the given pod.
  • --all-namespaces - The output will include pods from all namespaces on the same node as the given pod.
  • --kubeconfig - The location of the kubeconfig file if it's not in a standard location.
Nearby Nodes

To list nodes in the same zone as a given node:

kubectl nearby nodes NODE_NAME [OPTIONS]

kubectl-nearby uses the topology.kubernetes.io/zone label value to determine a node's zone.

Options:

  • --kubeconfig - The location of the kubeconfig file if it's not in a standard location.

Creating a new release

This is the standard release process for maintainers.

  1. Install gh (the GitHub CLI) if you don't have it already.

  2. Note the most recent release version:

    gh release list --limit 1
    
  3. Locally, checkout the main branch to the latest revision.

  4. Set the version variable for the new release (in the form vX.Y.Z):

    read -p "Enter the new version (e.g., v1.2.3): " VERSION
    
  5. Run the release script:

    bin/release $VERSION
    
  6. Create the release using the GitHub CLI:

    gh release create $VERSION $(find "releases/${VERSION}/targets" -name "*.tar.gz") \
      --title "Release $VERSION" \
      --generate-notes
    

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
nodes
Package nodes provides a CLI to list nearby nodes.
Package nodes provides a CLI to list nearby nodes.

Jump to

Keyboard shortcuts

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