-
Notifications
You must be signed in to change notification settings - Fork 260
docs(kapsule): add etcd clean-up tutorial #4750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| --- | ||
| meta: | ||
| title: Recovering ETCD Database space for a Kapsule/Kosmos cluster | ||
| description: Learn how to reclaim Database space for your Kubernetes Kapsule and Kosmos clusters to stay below your quota. | ||
louisportay marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| content: | ||
| h1: Recovering ETCD Database space for a Kapsule/Kosmos cluster | ||
louisportay marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| paragraph: Learn how to reclaim Database space for your Kubernetes Kapsule and Kosmos clusters to stay below your quota. | ||
louisportay marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| tags: kubernetes kapsule kosmos etcd | ||
| dates: | ||
| validation: 2025-04-01 | ||
| posted: 2025-04-01 | ||
| categories: | ||
| - containers | ||
| --- | ||
|
|
||
| Kubernetes Kapsule clusters have quotas on the space they can occupy on an etcd database. See Kapsule [cluster-types](https://api.scaleway.com/k8s/v1/regions/fr-par/cluster-types) for details on each offer. | ||
| You can see your current cluster space consumption at any time in your cluster grafana dashboard (`Etcd disk usage` panel). | ||
| This guide helps you to free up space on your database to avoid reaching this limit. | ||
|
|
||
| <Macro id="requirements" /> | ||
|
|
||
| - [Created](/kubernetes/how-to/create-cluster/) a Kubernetes Kapsule cluster | ||
| - [Downloaded](/kubernetes/how-to/connect-cluster-kubectl/) the Kubeconfig | ||
|
|
||
| * Looking for unused resources is a good approach, delete any Secrets, large ConfigMaps that are not used anymore in your cluster. | ||
|
|
||
| ```sh | ||
| > kubectl -n $namespace delete $ConfigMapName | ||
| ``` | ||
|
|
||
| * keep an eye on Helm Charts that are deploying a lot of custom resources (CRDs), they tend to fill up etcd space. You can find them by showing resource kinds | ||
|
|
||
| ```sh | ||
| > kubectl api-resources | ||
| NAME SHORTNAMES APIVERSION NAMESPACED KIND | ||
| configmaps cm v1 true ConfigMap | ||
| endpoints ep v1 true Endpoints | ||
| events ev v1 true Event | ||
| cronjobs cj batch/v1 true CronJob | ||
| jobs batch/v1 true Job | ||
| [...] | ||
| ``` | ||
| look for resources with an external apiversion (not _v1_, _apps/v1_, _storage.k8s.io/v1_ or _batch/v1_ for example). | ||
louisportay marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| <Message type="note"> | ||
| It is known that cluster with many nodes and with at least one GPU node may have a lot of _nodefeatures_ objects polluting their etcd space. We are working on a long-term fix but for now manually deleting these objects and downsizing the cluster (or upgrading to a dedicated offer with a bigger etcd quota) is the best solution. | ||
| </Message> | ||
|
|
||
| * If you have a doubt on space taken by a resource, you can dump it to get its size | ||
|
|
||
| ```sh | ||
| > kubectl get nodefeature -n kube-system $node-feature-name -o yaml | wc -c | ||
| 305545 // ~300KiB, big object | ||
| ``` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.