A.2. Running the Diagnostic Tools

Documentation

VoltDB Home » Documentation » VoltDB Kubernetes Administrator's Guide

A.2. Running the Diagnostic Tools

The diagnostics pod comes with two primary tools customized for use with Kubernetes:

  • collect — Collects configuration, status, and troubleshooting information about the database and base operating system from all nodes of the cluster and compresses them into a single file.

  • ksqlcmd — Executes interactive queries and commands against the database. The ksqlcmd command is identical to sqlcmd except with custom extensions for use in Kubernetes, such as the addition of a --release qualifier for identifying the database by its Helm release name.

To use these tools you must first connect to the diagnostics pod using the kubectl exec command. Note that the Kubernetes pod name is the Helm release name plus the suffix -volt-diagnostics. For example, the following command accesses the tool pod for the Helm release named volt-tools:

$ kubectl exec volt-tools-volt-diagnostics -it -- /bin/bash

When you connect to the command shell for the diagnostics pod, it displays a welcome message, listing all of the VoltDB databases running in the current namespace. For example:

----------------------------------------------
                  Welcome!
   VoltDB K8s Basic Environment information
----------------------------------------------
Helm releases installed:
    mydb
Default release used: "mydb"
    There are 6 pods in READY state
    There are 0 pods in NOT READY state
----------------------------------------------

From the command prompt, you can issue commands for any of the diagnostics tools. For example:

$ ksqlcmd --query="select * from contestants" --output-file=/tmp/results.txt 
$ helm voltadmin --release="mydb" collect --outdir=/tmp 

The following sections describe each of the diagnostics tools separately.