How to increase the size of a persistant volume
All persistant volumes (PV) which are created by the precomposer setup are only created with 1 GiB space. You will probably have to change (increase) this.
For example the elasticsearch PV for Graylog will quickly become to small. We'll use this as an example here.
Prerequisites
You need some kind of administrative access to the cluster:
- Either via UI (your provider's console UI or a kubernetes dashboard)
- or via command line using
kubectl
- or login to your ArgoCD instance.
This howto assumes that you are familiar with basic kubernetes handling using one of these methods. So here we only describe what you'll have to do in an abstract way.
Can not be done via GitOps
The creation of persistant volumes during the Precomposer setup is done via volumeClaimTemplates
in the corresponding manifests
(e.g. epc-deployment-configurations/base/elasticsearch/manifests.yaml
)
So the values are taken from there (as a template) to create the real persistant volume claims for the PVs.
This means that it will not increase the volume by changing the template value in the manifest.
You'll have to change the size in the corrrect persistant volume claim (PVC).
Background: The reason why it is done this way (via templates) is to stay independant from the storage providers and even from the storage classes in your environment.
Resizing persistent volumes by changing the persistant volume claims
There are many ways of finding the correct PVC and changing it. Here are some options:
Edit the PVC using kubectl
-
kubectl -n telemetry get pvc
will show a list of available PVCs in the namespace "telemetry". It will look similar to this:NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE es-data-dir-elasticsearch-0 Bound pvc-1601fd86-d774-498e-a2e8-ec23ecc7e2bc 1Gi RWO do-block-storage 65d grafana-data-grafana-0 Bound pvc-6b7f7a0f-c993-4ac7-a518-fd7cb6bbf8a1 1Gi RWO do-block-storage 65d influxdb-data-influxdb-0 Bound pvc-f0601dc8-6250-4012-a402-c8e0b08427bb 1Gi RWO do-block-storage 65d mongo-data-dir-mongodb-0 Bound pvc-70480c5e-8ea4-40d6-b223-ffe814bc2d09 1Gi RWO do-block-storage 65d
-
Change it interactively via
kubectl -n telemetry edit pvc es-data-dir-elasticsearch-0
and edit the resource request underspec
.
After some minutes the changes will be visible - e.g. by using kubectl -n telemetry get pvc es-data-dir-elasticsearch-0 -o yaml
.
Edit the PVC using ArgoCD
- Log in to ArgoCD - e.g. via https://ops.YOUR_INSTALLATION.precomposer.shop/argo-cd/ (opens in a new tab) (maybe different depending on you installation).
- Click on the desired application ("logging" in this example).
- Make sure the full-tree symbol is activated on the top right (first icon).
- Look for the PVC you want to change ("es-data-dir-elasticsearch-0") and click on it.
- Scoll below to see the "live manifest".
- Klick "Edit" and change the resource request under
spec
.
ArgoCD will update the manifest. It will take some minutes for the changed to become effective.