This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Pushing latest image to local kind cluster" | |
export KIND_EXPERIMENTAL_PROVIDER=podman | |
podman save <IMAGE> --format oci-archive -o ~/<IMAGE> | |
# loading to kind cluster named home-cluster | |
kind load image-archive ~/<IMAGE> --name home-cluster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
region='eu-west-1' | |
ec2_filter='karpenter.sh/provisioner-name/*' | |
ec2_ids=$(aws ec2 describe-instances --filters "Name=tag:Name,Values=${ec2_filter}" --region ${region} | jq --raw-output .Reservations[].Instances[].InstanceId) | |
info=$(aws ec2 describe-instances --instance-ids ${ec2_ids} --query 'Reservations[*].Instances[*].[InstanceId,BlockDeviceMappings[*].Ebs.[Status,VolumeId,AttachTime]]' --region ${region} ) | |
echo ${info} | jq 'map( .[0][0] as $instance_id | .[0][1] as $volumes | { "Instance_id": $instance_id, "Volume": $volumes | length, "Attached volume": ($volumes | map(select(.[0] == "attached")) | length), "Attaching volume": ($volumes | map(select(.[0] == "attaching")) | length) } )' | |
echo "Volume Attachments:" | |
kubectl get csinode -o custom-columns="NAME:metadata.name,LIM:spec.drivers[].allocatable.count" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# commands to resize volumes, for example useful to utilize more storage after resizing an attached EBS manually | |
# Expand the PV on /dev/sda1 after enlarging the partition with fdisk: | |
pvresize /dev/sda1 | |
# Extends the size of the logical volume "vg01/lvol10" by 1GiB | |
# on physical volume /dev/sda1. This is only possible if /dev/sda1 is a member of volume group vg01 and there are enough free physical extents in it: | |
lvextend -L +1024 /dev/vg01/lvol10 /dev/sda1 |