0

I'm trying to run dynamic 'cloud' Teamcity Agents containers on an in-house server under K3s, prior to moving to a 'real' k18s installation, but my agents need 21G of ephemeral storage and kubernetes gets upset if I configure them to need more than 20G. My root partition is 20G total (12G available), so I'd prefer ephemeral storage to be backed by /local/k3s which is a bit bigger.

The closest I've found to 'configuring' this is https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#local-ephemeral-storage which says:

Note: The kubelet will only track the root filesystem for ephemeral storage. OS layouts that mount a separate disk to /var/lib/kubelet or /var/lib/containers will not report ephemeral storage correctly.

So even if I make those soft links or bind-mounts or something, it seems I'm still stuck to the root partition size!

  • Is there actually no way to move ephemeral volume storage? Amazon seems to allow lots of gigabytes for ephemeral storage.

  • Assuming I'm doing something stupid in even trying this, what should I be doing?

1 Answers1

0

PersistentVolumes(PV) and PersistentVolumeClaims(PVC) come handy in this scenario, you just need to follow three simple steps for achieving this.

  • Attach the mount point to your node on which you need to have extra space(in your case it’s a single node).
  • Create a persistent volume and persistent volume claim in kubernetes.
  • Define the PVC in your deployment manifest file and your pods will be using this volume for storage.

Follow this official tutorial for more information and detailed instructions related to configuration, also go through this k3s storage docs for more information.