Skip to content

Instantly share code, notes, and snippets.

@mouchar
Last active July 16, 2021 08:40
Show Gist options
  • Select an option

  • Save mouchar/c9e53714ef8cd95a08fdb5d234bf1898 to your computer and use it in GitHub Desktop.

Select an option

Save mouchar/c9e53714ef8cd95a08fdb5d234bf1898 to your computer and use it in GitHub Desktop.
GoodData.CN Support bundle

GoodData.CN Support bundle

Collect basic information from the Kubernetes cluster and creates a single archive file that can be submitted for later analysis.

Sensitive data (like Secrets) are not collected. Other potentially sensitive data (usernames, passwords, IP addresses) are redacted.

This tool is Open Source, written by Replicated. You can find the source code in this repository and documentation here.

How to generate a support bundle

(before the first usage) Install krew plugin to kubectl

curl -s https://krew.sh/support-bundle | bash
export PATH="${PATH}:${HOME}/.krew/bin"

Run support bundle

kubectl support-bundle https://gist.github.com/mouchar/c9e53714ef8cd95a08fdb5d234bf1898/raw/eff9b6e9bf6d2a1e17d3f1b6794d87509fc78ceb/gooddata-cn.yaml

Collect the results

You will find a new file support-bundle-<<TIMESTAMP>>.tar.gz in current directory. Send this file to GoodData support, when requested.

apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
metadata:
name: supportbundle-gooddata-cn
spec:
collectors:
# collect logs from GoodData.CN
- logs:
selector:
- app.kubernetes.io/name=gooddata-cn
limits:
maxAge: 1d
maxLines: 1000
# collect logs from Apache Pulsar
- logs:
selector:
- app=pulsar
- cluster=pulsar
limits:
maxAge: 1d
maxLines: 1000
# collect logs from Cert-manager
- logs:
selector:
- app.kubernetes.io/instance=cert-manager
limits:
maxAge: 1d
maxLines: 1000
# collect logs from Kubernetes Ingress Controller
- logs:
selector:
- app.kubernetes.io/name=ingress-nginx
limits:
maxAge: 1d
maxLines: 1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment