Score:0

How can I move kubernetes ephemeral storage to a different disk?

jp flag

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?

Score:0
qa flag

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.

Kranthiveer Dontineni avatar
qa flag
@Timbaverstock is your issue resolved..? ping here if you need any additional help...
Tim Baverstock avatar
jp flag
@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.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.