Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion pages/kubernetes/how-to/recover-space-etcd.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
```
```