npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@redredchen01/k8s-tools

v1.0.0

Published

Kubernetes management CLI — pods, logs, exec, deploy, scale, rollout, config

Readme

@redredchen01/k8s-tools

Kubernetes management CLI — pods, logs, exec, deploy, scale, rollout, config

npm version License: MIT

Install

npm install -g @redredchen01/k8s-tools

Prerequisites

  • kubectl installed and configured with a valid kubeconfig

Quick Start

k8s-tools pods                               # list pods in current namespace
k8s-tools pods --namespace production        # list pods in a specific namespace
k8s-tools logs --pod api-server --follow     # tail logs
k8s-tools exec --pod nginx-abc123            # open shell
k8s-tools deploy --file k8s/api.yaml --wait  # apply manifest and wait
k8s-tools scale --deployment worker --replicas 3
k8s-tools rollout status --deployment api-server
k8s-tools config current                     # show active context and namespace

Commands

pods — List pods with readable status

Display pods with colorized status indicators and human-readable age. More readable than raw kubectl get pods.

k8s-tools pods --namespace production
k8s-tools pods --all-namespaces
k8s-tools pods --label app=nginx --wide
k8s-tools pods --namespace staging --json

Options: --namespace NS, --all-namespaces, --label SELECTOR, --wide, --json


logs — Multi-pod tail logs

Stream or display logs from one or more pods matching a name pattern. When multiple pods match, logs are prefixed with the pod name (stern-like).

k8s-tools logs --pod api-server --namespace production --tail 200
k8s-tools logs --pod worker --follow
k8s-tools logs --pod job-runner --since 1h --namespace staging

Options: --pod POD, --namespace NS, --container NAME, --tail N, --follow, --since DURATION, --json


exec — Quick pod shell access

Open an interactive shell inside a pod, or run a one-off command and capture its output.

k8s-tools exec --pod nginx-abc123
k8s-tools exec --pod api-server --container sidecar --shell /bin/bash
k8s-tools exec --pod nginx-abc123 --command "nginx -t"
k8s-tools exec --pod nginx-abc123 --command "cat /etc/hosts" --json

Options: --pod POD, --namespace NS, --container NAME, --shell SHELL, --command CMD, --json

Note: --json is only valid with --command; interactive shell mode does not support JSON output.


deploy — Apply deployment YAML

Apply a Kubernetes YAML manifest with optional client-side dry-run and automatic rollout wait.

k8s-tools deploy --file deployment.yaml
k8s-tools deploy --file k8s/api.yaml --namespace production --dry-run
k8s-tools deploy --file deployment.yaml --wait --timeout 120

Options: --file FILE, --namespace NS, --dry-run, --wait, --timeout SECS, --json


scale — Adjust replica count

Scale a Deployment to a target number of replicas and optionally wait for the operation to stabilize.

k8s-tools scale --deployment api-server --replicas 3
k8s-tools scale --deployment worker --replicas 0 --namespace staging
k8s-tools scale --deployment api-server --replicas 5 --wait

Options: --deployment NAME, --replicas N, --namespace NS, --wait, --json


rollout — View/manage rollout status

Inspect and control Kubernetes Deployment rollouts via four subcommands.

k8s-tools rollout status  --deployment api-server
k8s-tools rollout history --deployment api-server --namespace production
k8s-tools rollout undo    --deployment api-server
k8s-tools rollout undo    --deployment api-server --revision 3
k8s-tools rollout restart --deployment worker --namespace staging

Options: --deployment NAME, --namespace NS, --revision N (undo only), --json


config — Switch context/namespace

Inspect and switch kubectl contexts and namespaces without editing kubeconfig manually.

k8s-tools config current
k8s-tools config contexts
k8s-tools config use-context --name prod-cluster
k8s-tools config namespaces
k8s-tools config use-namespace --name staging

Options: --name NAME, --json


JSON Output (Pipe Protocol)

All commands support --json for structured output compatible with the Skill Foundry pipe protocol:

k8s-tools pods --namespace production --json | some-other-tool

Status Color Legend

| Color | Status | |---------|-------------------------------------------------| | Green | Running | | Yellow | Pending, ContainerCreating, Init:* | | Red | CrashLoopBackOff, Error, OOMKilled, ImagePullBackOff | | Magenta | Terminating, Unknown | | Cyan | Completed, Succeeded |

License

MIT