Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Kube Pod MonitorNew to Visual Studio Code? Get it now.
Kube Pod Monitor

Kube Pod Monitor

Simon Sheng

|
3 installs
| (0) | Free
Real-time Kubernetes pod log monitoring, alerting, and health checks for OKE/K8s clusters
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Kube Pod Monitor

A VS Code extension for real-time Kubernetes pod log monitoring, alerting, and health checks — directly inside your editor. Monitor multiple clusters simultaneously, stream logs, and get instant notifications when something goes wrong.

Features

Multi-Cluster Monitoring

  • Connect to multiple Kubernetes clusters (DEV / SQA / PROD) at the same time
  • Automatic health checks every 30 seconds with status bar indicators
  • One-click reconnect when cluster connectivity changes

Real-Time Log Streaming

  • Stream pod logs in real time via the Kubernetes API (@kubernetes/client-node)
  • Configurable log history depth (since) and buffer size
  • Color-coded log levels (info / warn / error / debug)
  • Per-pod log viewer in a dedicated Output Channel

Alert Engine

  • Regex-based alert rules matched against every log line
  • Three severity levels: warn, error, critical
  • Per-rule cooldown to prevent alert flooding
  • VS Code notifications for triggered alerts (configurable)
  • Alert history with acknowledge support

Dashboard Webview

  • Full-featured dashboard panel inside VS Code
  • Live log tail with filtering by cluster, service, and log level
  • Pod list with status, IP, node, and start time
  • Alert feed with statistics

Sidebar Tree Views

  • Pods view: hierarchical tree grouped by Cluster → Service → Pod
  • Alerts view: recent alerts with severity icons
  • Inline actions: view logs, refresh pods, open dashboard

Status Bar

  • Cluster health indicators (green ✓ / red ✗) always visible
  • Unacknowledged alert count with warning badge

Kubeconfig Management

  • Import Kubeconfig command: paste kubeconfig YAML directly in VS Code
  • Merge or overwrite existing kubeconfig files
  • YAML validation before saving
  • Custom kubeconfig path support (ideal for Windows or non-standard setups)

Requirements

  • VS Code ≥ 1.85.0
  • A valid kubeconfig file with configured contexts
  • Network access to the Kubernetes API server(s)
  • No kubectl CLI installation required

Getting Started

1. Install the Extension

From the Marketplace, the extension id is simonsheng.kube-pod-monitor (publisher + extension name).

# From the .vsix file
code --install-extension kube-pod-monitor-0.1.0.vsix

2. Set Up Kubeconfig

If you already have ~/.kube/config (Linux/macOS) or %USERPROFILE%\.kube\config (Windows), the extension will find it automatically.

If you don't have a kubeconfig file:

  1. Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  2. Run Kube Pod Monitor: Import Kubeconfig
  3. Paste your kubeconfig YAML content into the editor
  4. Save (Ctrl+S) to import

If your kubeconfig is in a custom location:

Open VS Code Settings and set:

{
  "kubePodMonitor.kubeconfigPath": "C:\\path\\to\\your\\kubeconfig"
}

Kubeconfig resolution order:

  1. kubePodMonitor.kubeconfigPath setting
  2. KUBECONFIG environment variable
  3. ~/.kube/config (default path)

3. Configure Clusters

Open VS Code Settings (Ctrl+,) and add your clusters:

{
  "kubePodMonitor.clusters": [
    {
      "name": "sqa",
      "context": "cfbp-priq-sqa-oke-phx-001",
      "namespace": "priq",
      "label": "SQA"
    },
    {
      "name": "dev",
      "context": "cfbp-priq-dev-oke-phx-001",
      "namespace": "priq",
      "label": "DEV"
    }
  ]
}
Field Required Description
name ✅ Short identifier (used internally)
context ✅ Context name from your kubeconfig
namespace Namespace to monitor (default: default)
label Display label in the UI (default: uppercased name)

4. Configure Services (Optional)

Define which pod groups to monitor via label selectors:

{
  "kubePodMonitor.services": [
    { "name": "pricing", "labelSelector": "app=pricing-service" },
    { "name": "validator", "labelSelector": "app=validator-service" },
    { "name": "orchestrator", "labelSelector": "app=priceriq-orch" }
  ]
}

If no services are defined, the extension will auto-discover pods in the namespace.

Commands

All commands are available via the Command Palette (Ctrl+Shift+P):

Command Description
Kube Pod Monitor: Open Dashboard Open the webview dashboard
Kube Pod Monitor: Refresh Pods Manually refresh the pod list
Kube Pod Monitor: Reconnect Clusters Reconnect to all configured clusters
Kube Pod Monitor: Show Pod Logs Open pod logs in an Output Channel
Kube Pod Monitor: Start Log Streaming Start real-time log streaming
Kube Pod Monitor: Stop Log Streaming Stop log streaming
Kube Pod Monitor: Import Kubeconfig Import/merge a kubeconfig file

Settings Reference

Setting Type Default Description
kubePodMonitor.kubeconfigPath string "" Absolute path to kubeconfig file
kubePodMonitor.configPath string "" Path to monitor.yaml (overrides other settings)
kubePodMonitor.clusters array [] Clusters to monitor
kubePodMonitor.services array [] Services to monitor (label selectors)
kubePodMonitor.alertRules array (see below) Alert rules (regex patterns)
kubePodMonitor.autoStream boolean true Auto-start log streaming on activation
kubePodMonitor.alertNotifications boolean true Show VS Code notifications for alerts
kubePodMonitor.tailLines number 500 Number of past log lines to fetch on connect
kubePodMonitor.bufferSize number 10000 Max log lines kept in memory
kubePodMonitor.since string "1h" How far back to read logs (e.g. 1h, 30m, 2h)

Default Alert Rules

[
  {
    "name": "exception",
    "pattern": "(?i)(exception|error|fatal|stacktrace)",
    "severity": "error",
    "cooldown": "60s"
  },
  {
    "name": "oom_kill",
    "pattern": "(?i)(out.?of.?memory|oom|heap.?space)",
    "severity": "critical",
    "cooldown": "300s"
  }
]

Custom Alert Rule Example

{
  "kubePodMonitor.alertRules": [
    {
      "name": "timeout",
      "pattern": "(?i)(timeout|timed.?out|read.?timed)",
      "severity": "warn",
      "cooldown": "120s"
    },
    {
      "name": "db_error",
      "pattern": "(?i)(sql.?exception|connection.?refused|deadlock)",
      "severity": "critical",
      "cooldown": "300s"
    }
  ]
}

Alternative Config: monitor.yaml

Instead of VS Code settings, you can use a monitor.yaml file. Place it in your workspace root or set kubePodMonitor.configPath:

contexts:
  sqa:
    context: cfbp-priq-sqa-oke-phx-001
    namespace: priq
    label: SQA

services:
  - name: pricing
    label_selector: app=pricing-service
  - name: validator
    label_selector: app=validator-service

log:
  tail_lines: 500
  buffer_size: 10000
  since: 1h

alerts:
  rules:
    - name: exception
      pattern: "(?i)(exception|error|fatal|stacktrace)"
      severity: error
      cooldown: 60s

Architecture

src/
├── extension.ts        # Entry point, command registration, lifecycle
├── config.ts           # Configuration loader (settings + YAML)
├── kubeClient.ts       # Kubernetes API client (multi-cluster)
├── logStore.ts         # In-memory log buffer with search
├── alertEngine.ts      # Regex-based alert engine with cooldown
├── podTreeProvider.ts  # Sidebar tree view (pods + alerts)
├── monitorWebview.ts   # Dashboard webview panel
└── statusBar.ts        # Status bar indicators

Development

# Install dependencies
npm install

# Compile
npm run compile

# Watch mode
npm run watch

# Package as .vsix
npm run package

License

MIT — see LICENSE.

Publish to VS Code Marketplace

  1. Create a publisher at Visual Studio Marketplace — manage publishers. The publisher ID must match publisher in package.json (currently simonsheng), or change package.json to your publisher ID.
  2. Personal Access Token (PAT) from Azure DevOps: User settings → Personal access tokens — scope Marketplace (Manage).
  3. Login once: npx @vscode/vsce login simonsheng and paste the PAT.
  4. Package locally (optional): npm run package → produces kube-pod-monitor-<version>.vsix.
  5. Publish: npm run publish:marketplace (or npx @vscode/vsce publish).

Official guide: Publishing Extensions.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft