Features
- Namespace and App Label Customization: Easily specify the Kubernetes namespace and the application label to target specific Cassandra pods.
- Secure Credential Handling: Fetches Cassandra user and password credentials securely from a Kubernetes secret.
- Comprehensive Diagnostics: Executes a wide array of
nodetool
commands to gather detailed diagnostics from each targeted Cassandra pod. - Automated Output Management: Saves the output of each
nodetool
command to a timestamped file for easy review and analysis.
Usage
-
Set Namespace and App Label: Modify the
NAMESPACE
andAPP_LABEL
variables at the top of the script to match your deployment if needed, for Apigee Hybrid default installations, you can skip this step. -
Ensure Correct Permissions: Make sure the script has execute permissions:
chmod +x script.sh
-
Run the Script: Execute the script from your terminal:
./script.sh
Output
The script generates output files in the /tmp
directory for each nodetool
command executed. Files are named in the format k_nodetool_<command>_<pod_name>_<timestamp>.txt
, making it easy to identify and correlate outputs.