diff --git a/pages/kubernetes/how-to/recover-space-etcd.mdx b/pages/kubernetes/how-to/recover-space-etcd.mdx index a54c92d7dd..8b89b162f3 100644 --- a/pages/kubernetes/how-to/recover-space-etcd.mdx +++ b/pages/kubernetes/how-to/recover-space-etcd.mdx @@ -22,6 +22,19 @@ This guide helps you to free up space on your database to avoid reaching this li - [Created](/kubernetes/how-to/create-cluster/) a Kubernetes Kapsule cluster - [Downloaded](/kubernetes/how-to/connect-cluster-kubectl/) the Kubeconfig +* Dump your cluster resources to YAML format and show the characters count, you will have a rough estimation where to look for space to claim + +```sh +> kubectl api-resources --verbs=list --namespaced -o name | while read type; do echo -n "Kind: ${type}, Size: "; kubectl get $type -o yaml -A | wc -c; done +Kind: configmaps, Size: 1386841 +Kind: endpoints, Size: 82063 +Kind: events, Size: 375065 +Kind: limitranges, Size: 68 +Kind: persistentvolumeclaims, Size: 68 +Kind: pods, Size: 3326153 +[...] +``` + * Looking for unused resources is a good approach, delete any Secrets, large ConfigMaps that are not used anymore in your cluster. ```sh @@ -51,4 +64,4 @@ Look for resources with an external apiversion (not _v1_, _apps/v1_, _storage.k8 ```sh > kubectl get nodefeature -n kube-system $node-feature-name -o yaml | wc -c 305545 // ~300KiB, big object - ``` \ No newline at end of file + ```