2

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 Answer 1

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.

2
  • 1
    @Timbaverstock is your issue resolved..? ping here if you need any additional help... Commented Mar 21, 2023 at 5:29
  • @KranthiveerDontinenti many thanks for this. We've suspended this for now, but I'll add the link to the ticket for when we pick it up again. Commented May 2, 2023 at 10:43

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.