Troubleshooting
Problem
Symptom
Cause
Resolving The Problem
-
exec into a storage pod
kubectl exec -it <storage-pod-name> -- bash
-
set up the following environment variable:
export CURL_CMD="curl -sk --cacert /etc/velox/certs/client/ca.crt --key /etc/velox/certs/client/tls.key --cert /etc/velox/certs/client/tls.crt https://localhost:9200"
N.B The CURL_CMD
variable will already exist inside the storage container in 10.0.5.6+ and 10.0.8+, so this step can be skipped.
-
List all indices
$CURL_CMD/_cat/indices/?v
-
Delete indices
DANGERDO NOT DELETE THE CURRENT INDEX.
The current index is the one that's currently being written to, and will be named with the latest date and sequence number. Deleting this will result in apic-api-w becoming an index instead of an alias. This is bad. Recovering from this will result in data loss.
-
Delete a single index
$CURL_CMD/<index> -XDELETE
Example:
$CURL_CMD/apic-api-2023.10.12-000009 -XDELETE
-
Delete multiple indices using a comma-separated list
$CURL_CMD/<index-1>,<index-2> -XDELETE
Example:
$CURL_CMD/apic-api-2023.10.12-000009,apic-api-2023.10.13-000010 -XDELETE
-
Delete multiple indices using wildcard (*)
The best way to illustrate this is using an example.
To delete all event indices created in September (month 09) in 2023:
$CURL_CMD/apic-api-2023.09.* -XDELETE
I recommend trying out the wildcard expression with the list indices command first, to be sure it returns the list you were expecting.
$CURL_CMD/_cat/indices/apic-api-2023.09.*?v
-
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
12 February 2024
UID
ibm17116604