diff --git a/website/src/content/docs/guides/cheatsheet.md b/website/src/content/docs/guides/cheatsheet.md new file mode 100644 index 00000000000..267585a5651 --- /dev/null +++ b/website/src/content/docs/guides/cheatsheet.md @@ -0,0 +1,95 @@ +--- +title: Cluster Cheatsheet +--- + +This page contains a useful selection of commands to troubleshoot and manage your cluster. + +## Fluxcd + +Show all Flux Resources: + +```bash +flux get all -A +``` + +Show all Kustomizations: + +```bash +flux get ks -A +``` + +Show all Helm-Releases: + +```bash +flux get hr -A +``` + +Show all Flux objects which are not ready: + +```bash +flux get all -A --status-selector ready=false +``` + +## Helm + +Get Values from a running deployment: + +```bash +helm get values -n +``` + +## Kubectl + +Most of the following commands can be adapted to either show all namespaces `-A` or only show a specific namespace with `-n `. Examples use the all namespaces flag. +Additionally you can use additional commands like `grep` to sort and filter your results. + +Show all Running Pods + +```bash +kubectl get pods -A +``` + +Show all Services: + +```bash +kubectl get svc -A +``` + +Show events: + +```bash +kubectl get events -A +``` + +Describe a pod: + +```bash +kubectl describe pod -n podname +``` + +As you can see kubectl follows a certain pattern. +The usual format is +```bash +kubectl (get/describe/delete/edit) -n +``` + +An exception to this pattern is the logs command: + +```bash +kubectl logs -n +``` + + +## Talosctl + +Show talos dashboard: + +```bash +talosctl dashboard +``` + +Show talos kernel logs: + +```bash +talosctl dmesg +```