Troubleshoot a failed Kubernetes backup on OpenShift | Trilio for Kubernetes
Find out why a Kubernetes backup failed on OpenShift with Trilio for Kubernetes, and collect a log bundle if you need to open a case with Trilio support.
You will:
- Check backup state in the T4K Monitoring dashboard and the Backup Overview
- Open a failed backup and read the phase that failed in its Status Log
- As an OpenShift admin, find the failed job pod in trilio-system and read the reason in its log
- Install the T4K log collector in the OpenShift Web Terminal and collect a cluster-wide bundle
The console tells you which phase failed and which pod. The pod log tells you why. Many failures, like this failing pre hook, you can fix from there without support.
Best practices covered: collect the logs within minutes of a failure, before anything cleans up the failed jobs and pods; leave the log level at Info, the default; alert on failed backups from day one with the T4K exporter and OpenShift monitoring.
Chapters
0:00 The Monitoring dashboard
0:40 Backup Overview and failed backups
0:54 Status Log and error message
1:14 Find the reason in the pod log
1:40 Collect logs right away
1:55 Install the log collector
2:28 Collect the bundle
2:50 Log level and alerts
Previous: Check a Kubernetes restore really works on OpenShift https://youtu.be/mo7aH0KWj0g
Read the failed pod log (OpenShift admin):
oc get pods -n trilio-system | grep BACKUP_NAME
oc logs -n trilio-system FAILED_POD | grep stderr
Install and run the log collector (v1.3.5 in this video):
export version=v1.3.5
OS="$(uname | tr '[:upper:]' '[:lower:]')"
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64$/arm64/')"
curl -fsSLO "https://github.com/trilioData/tvk-plugins/releases/download/${version}/log-collector_${version}_${OS}_${ARCH}.tar.gz"
tar zxf "log-collector_${version}_${OS}_${ARCH}.tar.gz"
mkdir -p ~/bin && mv log-collector ~/bin/kubectl-tvk_log_collector && export PATH=~/bin:$PATH
kubectl tvk-log-collector --log-level info
Without --namespaces it collects the whole cluster. For the latest version: https://docs.trilio.io/kubernetes/plugins/tvk-log-collector
Trilio for Kubernetes documentation for OpenShift: https://docs.trilio.io/kubernetes/getting-started/red-hat-openshift
Compatibility matrix: https://docs.trilio.io/kubernetes/overview/compatibility-matrix
Recorded on Red Hat OpenShift 4.21 with Trilio for Kubernetes 5.4.1.
#OpenShift #Kubernetes #Backup