Scan for disk-changes if those happened in a vm-environment by $host

echo 1 > /sys/block/sda/device/rescan

Install cloud-guest-utils which provide growpart

apk add cloud-utils-growpart
# or: yum install cloud-utils-growpart
# or: apt install cloud-utils

Extend partition to maximum available size

Check with lsblk if the disk is already expanded and if not, which partition to expand.

For example, if the disk is /dev/sda and the partition is /dev/sda1 run:

growpart /dev/sda 1

Extend ext4 filesystem to maximum available size

When using ext4 filesystem we can use resize2fs. Install it if not already available:

apk add e2fsprogs
# or: yum install e2fsprogs
# or: apt install e2fsprogs

and run:

resize2fs /dev/sda1

Source: https://unix.stackexchange.com/a/713597