# KOTS: MinIO / rqlite pod ran out of storage, how can I free up space?

**URL:** <https://community.replicated.com/t/kots-minio-rqlite-pod-ran-out-of-storage-how-can-i-free-up-space/1118>\
**Category:** Supporting your customers\
**Tags:** kots\
**Created:** [February 3, 2023, 5:29pm UTC](https://community.replicated.com/t/kots-minio-rqlite-pod-ran-out-of-storage-how-can-i-free-up-space/1118 "2023-02-03T17:29:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luis](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/luis/32/626_2.png) [@luis](https://community.replicated.com/u/luis)\
**Post date:** [February 3, 2023, 5:29pm UTC](https://community.replicated.com/t/kots-minio-rqlite-pod-ran-out-of-storage-how-can-i-free-up-space/1118/1 "2023-02-03T17:29:51Z")

</div>

If the MinIO pod that is deployed as part of the KOTS admin console runs out of storage we can free up some space by scaling down the kotsadm-minio statefulset and deleting the kotsadm-minio pvc.

**Please note that this will clear the version history from the admin console, only proceed if this is acceptable for your instance.**

1. Download the existing config values: `kubectl kots get config -n <namespace> --decrypt`.  
The config will be used again later when it’s time to reinstall the application.

2. Remove the application reference by running: `kubectl kots remove <app-slug> -n <namespace> -f`

3. Scale down MinIO: `kubectl scale statefulset kotsadm-minio --replicas=0 -n <namespace>`

4. Scale down rqlite: `kubectl scale statefulset kotsadm-rqlite --replicas=0 -n <namespace>`

5. Delete the MinIO PVC: `kubectl delete pvc kotsadm-minio-kotsadm-minio-0 -n <namespace>`

6. Delete the rqlite PVC: `kubectl delete pvc kotsadm-rqlite-kotsadm-rqlite-0 -n <namespace>`

7. Scale up MinIO: `kubectl scale statefulset kotsadm-minio --replicas=1 -n <namespace>`

8. Scale up rqlite: `kubectl scale statefulset kotsadm-rqlite --replicas=1 -n <namespace>`

9. Now the application can be reinstalled, this can be done via the cli or ui.

### Installing via the CLI:

Reinstalling the application via the CLI can be done with the following command:  
`kubectl kots install <app-slug> --license-file <license.yaml> --namespace <namespace> --config-values <config-values.yaml>`  
This is where we can provide the application’s configuration that was saved in step 1.

For more information on kots install see:

> **[install | Replicated Docs](https://docs.replicated.com/reference/kots-cli-install)**
>
> Installs the application and the KOTS Admin Console directly to a cluster.

## Installing via the UI:

If the application is being reinstalled via the ui it is recommended to delete the current kotsadm pod first.

- Find the current kotsadm pod name: `kubectl get pods -n <namespace>`
- Delete the pod:  
`kubectl delete pod <kotsadm-pod-name> -n <namespace>`
- Command to access admin console (if needed): `kubectl kots admin-console -n <namespace>` and continue the installation through the admin console.
- The application’s config values will have to be entered manually via the ui.

---

<div class="post-metadata">

**Author:** ![diamon\_w](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/diamon_w/32/150_2.png) [@diamon\_w](https://community.replicated.com/u/diamon_w)\
**Post date:** [November 27, 2023, 6:27pm UTC](https://community.replicated.com/t/kots-minio-rqlite-pod-ran-out-of-storage-how-can-i-free-up-space/1118/2 "2023-11-27T18:27:35Z")

</div>

If KOTS is using the `minio` deployment from the `minio` namespace and not `kotsadm-minio`, we recommend the following:

1. Download the existing config values - `kubectl kots get config --namespace APP_NAMESPACE --decrypt`
2. Exec into kotsadm pod
3. export S3\_HOST=$(echo $S3\_ENDPOINT | awk -F/ ‘{print $3}’)
4. s3cmd --access\_key=$S3\_ACCESS\_KEY\_ID --secret\_key=$S3\_SECRET\_ACCESS\_KEY --host=$S3\_HOST --no-ssl --host-bucket=$S3\_BUCKET\_NAME.$S3\_HOST del s3://$S3\_BUCKET\_NAME --recursive --force
5. Scale down kotsadm and kotsadm-rqlite to `0`
6. Delete kotsadm-rqlite pvc
7. Scale kotsadm and kotsadm-rqlite back up to `1`
8. Re-install app using the downloaded config values
