Skip to content

KubeBuddy - A PowerShell tool for monitoring and managing Kubernetes clusters. Perform health checks, resource usage insights, and configuration audits with ease. Supports AKS best practices, snapshot-based monitoring, and security checks tailored for Kubernetes environments. Available on the PowerShell Gallery.

License

Notifications You must be signed in to change notification settings

KubeDeckio/KubeBuddy

KubeBuddy


Publish Module to PowerShell Gallery PowerShell Gallery Version PowerShell Downloads GitHub Downloads (all assets, all releases) License

Container Details

current version image tags image size

KubeBuddy is a PowerShell-based Kubernetes assistant that helps you monitor cluster health, workloads, networking, security, and more. It generates HTML and text-based reports to help you quickly assess your Kubernetes environment.

Documentation

For complete installation, usage, and advanced configuration instructions, visit the KubeBuddy Documentation.

Features

  • Cluster Health Monitoring: Checks node status, resource usage, and pod conditions.
  • Workload Analysis: Identifies failing pods, restart loops, and stuck jobs.
  • Event Reporting: Summarizes Kubernetes events to highlight errors and warnings.
  • RBAC & Security Checks: Identifies excessive permissions and misconfigurations.
  • Storage & Networking Insights: Analyzes persistent volumes, services, and network policies.
  • Customizable Thresholds: Configure warning/critical levels in kubebuddy-config.yaml.
  • HTML & Text Reports: Generates clean reports for analysis and sharing.
  • PowerShell Support: Install via PowerShell Gallery and run on Windows, macOS, or Linux.
  • AKS Best Practices Check: Checks Azure Kubernetes Service (AKS) clusters for Best Practices. (Currently 34 fully automated tests!)

Installation

PowerShell Gallery

To install KubeBuddy using PowerShell:

Install-Module -Name KubeBuddy -Repository PSGallery -Scope CurrentUser

Platform Support

  • PowerShell Module: Works on Windows, macOS, and Linux.

For additional installation methods, refer to the KubeBuddy Documentation.

Usage

PowerShell Command

Run KubeBuddy in PowerShell:

Invoke-KubeBuddy

Run KubeBuddy in PowerShell with the option to do an AKS Health Check:

Invoke-KubeBuddy -aks -SubscriptionId <subscriptionID> -ResourceGroup <resourceGroup> -ClusterName <clusterName>

Generate Reports

  • HTML Report:
    Invoke-KubeBuddy -HtmlReport
  • Text Report:
    Invoke-KubeBuddy -txtReport
  • Add AKS Best Practices section to HTML report:
    Invoke-KubeBuddy -HtmlReport -aks -SubscriptionId <subscriptionID> -ResourceGroup <resourceGroup> -ClusterName <clusterName>
    • Add AKS Best Practices section to Text report:
    Invoke-KubeBuddy -txtReport -aks -SubscriptionId <subscriptionID> -ResourceGroup <resourceGroup> -ClusterName <clusterName>

Configuration

KubeBuddy uses a YAML configuration file (kubebuddy-config.yaml) to define thresholds:

thresholds:
  cpu_warning: 50
  cpu_critical: 75
  mem_warning: 50
  mem_critical: 75
  restarts_warning: 3
  restarts_critical: 5
  pod_age_warning: 15
  pod_age_critical: 40
  stuck_job_hours: 2
  failed_job_hours: 2
  event_errors_warning: 10
  event_errors_critical: 20
  event_warnings_warning: 50
  event_warnings_critical: 100

This file should be placed at:

~/.kube/kubebuddy-config.yaml

If missing, KubeBuddy falls back to default settings.

Changelog

All notable changes to this project are documented in the CHANGELOG.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

KubeBuddy - A PowerShell tool for monitoring and managing Kubernetes clusters. Perform health checks, resource usage insights, and configuration audits with ease. Supports AKS best practices, snapshot-based monitoring, and security checks tailored for Kubernetes environments. Available on the PowerShell Gallery.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages