All Projects → dastergon → kubectl-janitor

dastergon / kubectl-janitor

Licence: Apache-2.0 license
List Kubernetes objects in a problematic state

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to kubectl-janitor

KuiClientTemplate
Use this template to make your own custom graphical terminal, via the Kui Grahpical CLI Framework
Stars: ✭ 26 (-45.83%)
Mutual labels:  kubectl, kubectl-plugins, krew, krew-plugin
kube-lineage
A CLI tool to display all dependencies or dependents of an object in a Kubernetes cluster.
Stars: ✭ 238 (+395.83%)
Mutual labels:  k8s, kubectl, kubectl-plugins, kubectl-plugin
kubectl-iexec
Kubectl plugin to interactively exec into a pod
Stars: ✭ 102 (+112.5%)
Mutual labels:  kubectl, kubectl-plugins, kubectl-plugin
kubectl-df-pv
kubectl plugin - giving admins df (disk free) like utility for persistent volumes
Stars: ✭ 256 (+433.33%)
Mutual labels:  kubectl, kubectl-plugin, krew-plugin
rbac-tool
Rapid7 | insightCloudSec | Kubernetes RBAC Power Toys - Visualize, Analyze, Generate & Query
Stars: ✭ 546 (+1037.5%)
Mutual labels:  kubectl, kubectl-plugin, krew-plugin
kubectl-plugin-ssh-jump
A kubectl plugin to access nodes or remote services using a SSH jump Pod
Stars: ✭ 117 (+143.75%)
Mutual labels:  kubectl, kubectl-plugins, kubectl-plugin
kubectl-secretdata
A kubectl plugin for viewing decoded Secret data with search flags.
Stars: ✭ 37 (-22.92%)
Mutual labels:  kubectl, kubectl-plugins, kubectl-plugin
kubectl-view-webhook
👀 ‼️ This projects aims to visualize critical parts of the admission webhook configuration resource
Stars: ✭ 96 (+100%)
Mutual labels:  kubectl, krew, kubectl-plugin
Kubectl Tree
kubectl plugin to browse Kubernetes object hierarchies as a tree 🎄 (star the repo if you are using)
Stars: ✭ 1,962 (+3987.5%)
Mutual labels:  kubectl, kubectl-plugins, kubectl-plugin
kubectl-whoami
This plugin gets the subject name using the effective kubeconfig
Stars: ✭ 74 (+54.17%)
Mutual labels:  kubectl, kubectl-plugins, krew
kubectlsafe
Safe operations in kubectl with plugin kubectlsafe
Stars: ✭ 36 (-25%)
Mutual labels:  kubectl, kubectl-plugins, kubectl-plugin
kubectl-gs
kubectl plugin helping with custom resources by Giant Swarm
Stars: ✭ 36 (-25%)
Mutual labels:  kubectl, kubectl-plugins, kubectl-plugin
kubectl-images
🕸 Show container images used in the cluster.
Stars: ✭ 153 (+218.75%)
Mutual labels:  k8s, kubectl, kubectl-plugins
Geodesic
🚀 Geodesic is a DevOps Linux Distro. We use it as a cloud automation shell. It's the fastest way to get up and running with a rock solid Open Source toolchain. ★ this repo! https://slack.cloudposse.com/
Stars: ✭ 629 (+1210.42%)
Mutual labels:  kubernetes-cluster, k8s, kubectl
kubectl-passman
kubectl plugin that provides the missing link/glue between common password managers and kubectl
Stars: ✭ 69 (+43.75%)
Mutual labels:  kubectl-plugins, kubectl-plugin
kubernetes-starterkit
A launchpad for developers to learn Kubernetes from scratch and deployment of microservices on a kubernetes cluster.
Stars: ✭ 39 (-18.75%)
Mutual labels:  kubernetes-cluster, kubectl
Pod-Dive
A kubectl plugin to dive into your Kubernetes nodes pods, and inspect them.
Stars: ✭ 46 (-4.17%)
Mutual labels:  kubectl-plugins, krew-plugin
kubectl-tmux-logs
A kubectl plugin to display container logs within separate tmux panes
Stars: ✭ 19 (-60.42%)
Mutual labels:  kubectl, kubectl-plugins
kubectl-ctx
Simple kubectl plugin to display/switch contexts
Stars: ✭ 36 (-25%)
Mutual labels:  kubectl, kubectl-plugins
kubeadm-vagrant
Setup Kubernetes Cluster with Kubeadm and Vagrant
Stars: ✭ 49 (+2.08%)
Mutual labels:  kubernetes-cluster, kubectl

kubectl janitor

Build Status Go Report Card LICENSE Releases

kubectl janitor is a kubectl plugin that assists in finding objects in a problematic state in your Kubernetes cluster.

Introduction

Troubleshooting Kubernetes clusters sometimes requires a combination of kubectl commands and other command-line tools such as jq to do correlations around the issues that the various objects might have. Moreover, sometimes the supported options of the --field-selector flag might be limited.

During troubleshooting scenarios, people need to identify the issues quickly without worrying about remembering all the different command combinations. The primary goal of this plugin is to collect some commonly executed kubectl command patterns to identify objects in a problematic state in the cluster and reduce the cognitive load for people troubleshooting.

Installing

Krew

You can install kubectl janitor using the Krew, the package manager for kubectl plugins.

Once you have Krew installed run the following command:

kubectl krew install janitor

Releases

Check the release page for the full list of pre-built assets.

Install

  1. Download one of the releases that are compatible with your os/arch.
  2. Unzip to get kubectl-janitor
  3. Add it to your PATH or move it to a path already in in PATH (i.e., /usr/local/bin)

Source

go get -u github.com/dastergon/kubectl-janitor/cmd/kubectl-janitor

This command will download and compile kubectl-janitor.

Usage

To get the full list of commands with examples:

kubectl janitor

Features

List Pods that are in a pending state (waiting to be scheduled)

kubectl janitor pods unscheduled

List Pods in an unhealthy state

kubectl janitor pods unhealthy

List Pods that are currently running but not ready for some reason

kubectl janitor pods unready

List the current statuses of the Pods and their respective count

kubectl janitor pods status

List Jobs that have failed to run and have restartPolicy: Never

kubectl janitor jobs failed

List PesistentVolumes that are available for claim

kubectl janitor pvs unclaimed

List PersistentVolumeClaims in a pending state (unbound)

kubectl janitor pvcs pending

You can use the -A or --all-namespaces flag to search for objects in all namespaces.

You can use the --no-headers flag to avoid showing the column names.

Cleanup

If you have installed the plugin via the krew command. You can remove the plugin by using the same tool:

kubectl krew uninstall kubectl-janitor

Or, you can "uninstall" this plugin from kubectl by simply removing it from your PATH:

rm /usr/local/bin/kubectl-janitor

Author

Pavlos Ratis @dastergon.

License

Apache 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].