narmidm/k8stoolbox

By narmidm

Updated 4 months ago

Kubernetes management and debugging toolbox for cluster admins and developers.

Image
Monitoring & Observability
Networking
Developer Tools
0

67

K8sToolbox

K8sToolbox is a versatile toolkit designed for managing Kubernetes clusters, providing essential debugging tools and utilities for cluster administrators and developers.

Overview

K8sToolbox offers a variety of tools to assist with:

  • Cluster Troubleshooting: Diagnose issues such as resource contention, network problems, and failed pods.
  • Resource Cleanup: Manage stale or orphaned Kubernetes resources, like completed jobs or unused replicasets.
  • Automation: Automate day-to-day tasks such as scaling deployments and monitoring resource usage.
  • Network Diagnostics: Test and debug Kubernetes network policies.
  • Log Aggregation: Collect and analyze logs from multiple namespaces to gain insights into your cluster state.

Getting Started

To pull the latest version of K8sToolbox:

docker pull narmidm/k8stoolbox:latest
Running K8sToolbox

To use K8sToolbox within your Kubernetes cluster, you can deploy it as a standalone pod:

kubectl apply -f https://raw.githubusercontent.com/narmidm/K8sToolbox/refs/heads/master/manifests/debug-pod.yaml

Or deploy it as a DaemonSet to make it available on all nodes:

kubectl apply -f https://raw.githubusercontent.com/narmidm/K8sToolbox/refs/heads/master/manifests/debug-daemon.yaml
Supported Tags
  • latest: Always points to the latest stable version.
  • Version tags: Semantic versioning tags like v1.1.0, v1.2.0 provide specific releases with unique feature sets.

Usage

K8sToolbox contains a collection of scripts that can be executed to perform common Kubernetes management and debugging tasks:

  • Health Check: Monitor the health of nodes and pods.
  • Network Policy Testing: Verify connectivity between different pods.
  • Log Aggregation: Collect logs from all pods across specified namespaces.
  • Auto Scaling: Automatically scale deployments based on workload.
Example Commands

Run the health check script:

kubectl exec -it <k8stoolbox-pod-name> -- /usr/local/bin/healthcheck default

Run the log aggregation script for kube-system namespace:

kubectl exec -it <k8stoolbox-pod-name> -- /usr/local/bin/aggregate_logs default kube-system

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

Contributing

Contributions are welcome! See the GitHub repository for more details and guidelines on how to contribute.

Docker Pull Command

docker pull narmidm/k8stoolbox