Update: See Retrieve KOTS Config Values When the Admin Console is Unavailable for the latest community post on this subject which provides a utility for exporting the values in cases where the Admin Console isn’t available
Under normal circumstances, you can retrieve KOTS application config values using the KOTS CLI kots get config
When the KOTS Admin Console is unavailable but you need to access application configuration values, you can retrieve them directly from the rqlite database. This guide explains how to access both current and previous version configurations.
Prerquisites
- Access to the Kubernetes cluster with sufficient permissions
- StatefulSet
kotsadm-rqliteis up and running kubectlCLI tool installed and configuredcurljqinstalled
Instructions
- Port-Forward to rqlite Service, first establish a connection to the rqlite service:
export NAMESPACE=<namespace>
kubectl port-forward svc/kotsadm-rqlite 4001:4001 -n $NAMESPACE
- Retrieve Configuration Values in a new terminal window, run the following commands:
export NAMESPACE=<namespace>
export URL=kotsadm:$(kubectl get secret kotsadm-rqlite -n $NAMESPACE -o jsonpath='{.data.password}' | base64 -d)@localhost:4001
# for latest config values
curl -sG $URL/db/query\?pretty\&timings --data-urlencode 'q=select av.config_values from app_version av join app a on a.id=av.app_id and a.current_sequence = av.sequence' | jq -r '.results[0].values[0][0]' > config-values.yaml
# for config values for specific app sequence, replace <sequence> with actual sequence number
curl -sG $URL/db/query\?pretty\&timings --data-urlencode 'q=select config_values from app_version where sequence = <sequence>' | jq -r '.results[0].values[0][0]' > config-values.yaml