popeye: Kubernetes cluster resource sanitizer
Popeye – A Kubernetes Cluster Sanitizer
Popeye is a utility that scans live Kubernetes cluster and reports potential issues with deployed resources and configurations. It sanitizes your cluster based on what’s deployed and not what’s sitting on the disk. By scanning your cluster, it detects misconfigurations and helps you to ensure that best practices are in place, thus preventing future headaches. It aims at reducing the cognitive overload one faces when operating a Kubernetes cluster in the wild. Furthermore, if your cluster employs a metric-server, it reports potential resources over/under allocations and attempts to warn you should your cluster run out of capacity.
Popeye is a readonly tool, it does not alter any of your Kubernetes resources in any way!
Sanitizers
Popeye scans your cluster for best practices and potential issues. Currently, Popeye only looks at nodes, namespaces, pods and services. More will come soon! We are hoping Kubernetes friends will pitch’in to make Popeye even better.
The aim of the sanitizers is to pick up on misconfigurations, i.e. things like port mismatches, dead or unused resources, metrics utilization, probes, container images, RBAC rules, naked resources, etc…
Popeye is not another static analysis tool. It runs and inspect Kubernetes resources on live clusters and sanitize resources as they are in the wild!
Here is a list of some of the available sanitizers:
Resource | Sanitizers | Aliases | |
---|---|---|---|
🛀 | Node | no | |
Conditions ie not ready, out of mem/disk, network, pids, etc | |||
Pod tolerations referencing node taints | |||
CPU/MEM utilization metrics, trips if over limits (default 80% CPU/MEM) | |||
🛀 | Namespace | ns | |
Inactive | |||
Dead namespaces | |||
🛀 | Pod | po | |
Pod status | |||
Containers statuses | |||
ServiceAccount presence | |||
CPU/MEM on containers over a set CPU/MEM limit (default 80% CPU/MEM) | |||
Container image with no tags | |||
Container image using latest tag |
|||
Resources request/limits presence | |||
Probes liveness/readiness presence | |||
Named ports and their references | |||
🛀 | Service | svc | |
Endpoints presence | |||
Matching pods labels | |||
Named ports and their references | |||
🛀 | ServiceAccount | sa | |
Unused, detects potentially unused SAs | |||
🛀 | Secrets | sec | |
Unused, detects potentially unused secrets or associated keys | |||
🛀 | ConfigMap | cm | |
Unused, detects potentially unused cm or associated keys | |||
🛀 | Deployment | dp, deploy | |
Unused, pod template validation, resource utilization | |||
🛀 | StatefulSet | sts | |
Unsed, pod template validation, resource utilization | |||
🛀 | DaemonSet | ds | |
Unsed, pod template validation, resource utilization | |||
🛀 | PersistentVolume | pv | |
Unused, check volume bound or volume error | |||
🛀 | PersistentVolumeClaim | pvc | |
Unused, check bounded or volume mount error | |||
🛀 | HorizontalPodAutoscaler | hpa | |
Unused, Utilization, Max burst checks | |||
🛀 | PodDisruptionBudget | ||
Unused, Check minAvailable configuration | pdb | ||
🛀 | ClusterRole | ||
Unused | cr | ||
🛀 | ClusterRoleBinding | ||
Unused | crb | ||
🛀 | Role | ||
Unused | ro | ||
🛀 | RoleBinding | ||
Unused | rb | ||
🛀 | Ingress | ||
Valid | ing | ||
🛀 | NetworkPolicy | ||
Valid | np | ||
🛀 | PodSecurityPolicy | ||
Valid | psp |
You can also see the full list of codes
Install & Use
Copyright © 2020, Imhotep Software LLC <fernand@imhotep.io>
All rights reserved.