Popeye - It's a utility which scans K8s clusters and reports potential issues in deployed resources and configurations.
Note: This is a read-only tool, it will not make any changes in the K8s cluster.
In this blog, we will see how to install it and use this tool
Requirements:
1. K8s cluster
2. Linux VM
Step 1: Install the Popeye tool
Use the below command to install in MacBook,
brew install derailed/popeye/popeye
For other OS use the below link to install it.
You can install with "krew" as well by the using below command,
kubectl krew install popeye
Step 2: Run the Popeye tool to scan the Kubernetes cluster,
Note: Popeye CLI works like the kubectl command, so make sure you have the Kube config in local to connect to the cluster.
This command runs in all nodes and namespaces by default,
popeye
In the above output, you can see the overall status of the cluster and its configurations and it gives the score as well at the end. The current score is 87% and a B rank. To improve the score, we need to work on the suggestions which are recommended.
If you need to run a specific namespace and configuration you can use the below command,
For the specific namespace,
popeye -n devopsart
For specific configurations like config map,
popeye -n devopsart -s configmap
For specific deployments,
popeye -n devopsart -s deploy
Step 3: HTML report generation and Save the report locally
To save the report in the current directory use the below command,
POPEYE_REPORT_DIR=$(pwd) popeye --save
then run the required popeye command, and the scan will be saved in the current directory
To save the report in HTML use the below command,
POPEYE_REPORT_DIR=$(pwd) popeye --save --out html --output-file report.html
And run the required popeye command and see the report.html file in the browser,
That's all, we have successfully installed the "Popeye" tool and validated it with the K8s cluster. This helps to improve our K8s cluster configuration and make our cluster more stable.
Post a Comment