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

kubelet-js-sdk

v0.1.0

Published

JavaScript SDK for Kubelet API

Readme

Kubelet JavaScript SDK

A JavaScript SDK for interacting with the Kubelet API.

Installation

npm install kubelet-js-sdk

Usage

import { Kubelet } from 'kubelet-js-sdk';

// Create a new Kubelet instance
const kubelet = new Kubelet({
  baseUrl: 'http://localhost:10250'
});

// Get list of pods
const pods = await kubelet.pods.getPods();

// Get metrics
const metrics = await kubelet.metrics.getMetrics();
const cadvisorMetrics = await kubelet.metrics.getMetricsCadvisor();

// Run a command in a container
const result = await kubelet.run.runCommand(
  'default',
  'my-pod',
  'my-container',
  'ls -la'
);

// Execute a command with stream options
const execResult = await kubelet.exec.execCommand(
  'default',
  'my-pod',
  'my-container',
  'bash',
  true,  // input
  true,  // output
  true   // tty
);

API Reference

Pods

// Get list of pods
const pods = await kubelet.pods.getPods();

Metrics

// Get metrics
const metrics = await kubelet.metrics.getMetrics();

// Get cadvisor metrics
const cadvisorMetrics = await kubelet.metrics.getMetricsCadvisor();

// Get resource metrics
const resourceMetrics = await kubelet.metrics.getMetricsResource();

// Get probes metrics
const probesMetrics = await kubelet.metrics.getMetricsProbes();

Logs

// Get logs from path
const logs = await kubelet.logs.getLogs('path/to/logs');

// Get logs from subpath
const subpathLogs = await kubelet.logs.getLogsBySubpath('subpath');

Container Logs

// Get container logs
const containerLogs = await kubelet.containerLogs.getContainerLogs(
  'default',
  'my-pod',
  'my-container'
);

Healthz

// Get health status
const health = await kubelet.healthz.getHealthz();

// Get health check logs
const healthLogs = await kubelet.healthz.getHealthzLog();

// Ping health check
const ping = await kubelet.healthz.getHealthzPing();

// Get sync loop status
const syncLoop = await kubelet.healthz.getHealthzSyncloop();

Debug

// Get pprof profile
const profile = await kubelet.debug.getPprofProfile('heap');

// Get debug flags
const flags = await kubelet.debug.getDebugFlags();

// Set debug flags
await kubelet.debug.setDebugFlags('v=4');

Stats

// Get node and pod stats
const stats = await kubelet.stats.getStats();

// Get summary stats
const summary = await kubelet.stats.getStatsSummary(true); // only CPU and memory

// Get container stats
const containerStats = await kubelet.stats.getContainerStats();

// Get specific container stats
const podStats = await kubelet.stats.getContainerStatsByDetails(
  'default',
  'my-pod',
  'pod-uid',
  'my-container'
);

Run

// Run command in container
const result = await kubelet.run.runCommand(
  'default',
  'my-pod',
  'my-container',
  'ls -la'
);

// Run command with UID
const resultWithUid = await kubelet.run.runCommandWithUid(
  'default',
  'my-pod',
  '1000',
  'my-container',
  'whoami'
);

Exec

// Execute command with stream options
const execResult = await kubelet.exec.execCommand(
  'default',
  'my-pod',
  'my-container',
  'bash',
  true,  // input
  true,  // output
  true   // tty
);

// Execute command with UID
const execResultWithUid = await kubelet.exec.execCommandWithUid(
  'default',
  'my-pod',
  '1000',
  'my-container',
  'bash',
  true,
  true,
  true
);

Attach

// Attach to container
const attachResult = await kubelet.attach.attach(
  'default',
  'my-pod',
  'my-container',
  true,  // input
  true,  // output
  true   // tty
);

Port Forward

// Forward port to pod
const forwardResult = await kubelet.portForward.portForward(
  'default',
  'my-pod',
  8080,
  true,  // input
  true   // output
);

CRI

// Get CRI info
const criInfo = await kubelet.cri.getCriInfo();

// Get CRI version
const criVersion = await kubelet.cri.getCriVersion();

// Get CRI status
const criStatus = await kubelet.cri.getCriStatus();

License

MIT