Kubernetes Node disk-pressure - 10 steps to Increase VM partition size

Опубликовано: 09 Февраль 2025
на канале: BPFire
2,358
22

While trying to setup Kubernetes cluster with kubeadm for Cilium demo, the coredns pod stuck in pending status and reason being disk under pressure due to limited VM disk space, thus a quick demo to increase VM disk and partition

1,query the VM image info:
qemu-img info ubuntu-2004.qcow2

2,increase the VM disk size:
qemu-img resize ubuntu-2004.qcow2 +20G

3,start the VM:
list the block size:
lsblk
4,grow the partition:
growpart /dev/vda 3

5 resize the pv
pvresize /dev/vda3

6 pvs (display physical volume size)

7 vgs (display the virtual group size)

8 extend the logical volume partition size
lvextend -r -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

9 resize the file system (seems not needed here)
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv

10 check the result
df -hT

ref: https://computingforgeeks.com/how-to-...
ref: https://computingforgeeks.com/extendi...