Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Kubernetes Helper Scripts

This repository contains a collection of Kubernetes helper scripts designed to assist in day-to-day operations. These scripts simplify common Kubernetes tasks such as restarting pods based on resource usage and monitoring namespace resource consumption.

Available Scripts

1. restart_pod_high_resource.sh

This script identifies and restarts pods in a specified namespace that are consuming more than a specified CPU or memory threshold.

Usage:

curl -s https://raw.githubusercontent.com/mhrznamn068/kubernetes-helper-scripts/main/scripts/restart_pod_high_resource.sh | bash -s <namespace>

2. top_usage_by_ns.sh

This script identifies the namespace's with high resource utilization and outputs the total sum of the resource consumption.

Usage:

curl -s https://raw.githubusercontent.com/mhrznamn068/kubernetes-helper-scripts/main/scripts/top_usage_by_ns.sh | bash -s cpu
curl -s https://raw.githubusercontent.com/mhrznamn068/kubernetes-helper-scripts/main/scripts/top_usage_by_ns.sh | bash -s memory

3. top_usage_by_service.sh

This script identifies the services with high resource utilization and outputs the total sum of the resource consumption.

Usage:

curl -s https://raw.githubusercontent.com/mhrznamn068/kubernetes-helper-scripts/main/scripts/top_usage_by_service.sh | bash -s <namespace>

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages