This utility generates report about overview of Kubernetes/OpenShift clusters. It includes details such as the total number of namespaces, services, persistent volumes (PV), persistent volume claims (PVC), and total storage consumed. If the cluster is OpenShift, it also includes the number of routes. If user haven't specified --no_ns_details argument while running the script it also contains namespace wise details at the end of this report.
Steps to Use the Utility:
Download the utility installer using below link to your local machine.
Once you downloaded this utility, you just need to follow below steps.
1. Give executable Permission to shared utility.
chmod +x /tmp/cluster-license-report-release-1.3.49.16.sh
2. Run the utility.
Once you run this utility, then it will generate script and log file as shown in below snippet.
/tmp/cluster-license-report-release-1.3.49.16.sh
3. You can also use below help option which provides detailed information about available command-line arguments and usage instructions.
/opt/swift/bin/cluster-license-report --help
By default, if no arguments are provided, the utility will generate a report for the entire cluster, including detailed information for each namespace.
You can use the following arguments based on your use case:
1. --namespace
Use this option to generate the report for specific namespaces only. Provide a space-separated list of the desired namespaces.
Example:
/opt/swift/bin/cluster-license-report --namespace ns1 ns2 ns3
This will generate the report for the specified namespaces (ns1
, ns2
, and ns3
).
2. --no_ns_details
Use this option to skip detailed information for each namespace (such as services, images, etc.).
Example:
/opt/swift/bin/cluster-license-report --no_ns_details
This will generate the report without listing detailed data for each namespace.
3. Then directly run the created a script. Once you run this script, it will ask the kubecofig file path. if kubeconfig file is saved at "~/.kube/config" location just press enter. If it is saved at some other location then enter that path.
To run this script use :
/opt/swift/bin/cluster-license-report
-- The report will be generated in PDF format at the following location:
/tmp/cluster-license-report/<cluster_name>_cluster-report_<date>_.pdf
-- Log details are available at:
/tmp/cluster-license-report/script-cluster-license-report.log
You can check this log file for any errors that may have occurred during report generation.
Pls check below snippet for your reference.
4. Go to that generated pdf report and open it in your local machine. that you will get Cluster summary, license summary and namespace, storage , PV and PVC details.
Generated report as below.