Skip to content

Instantly share code, notes, and snippets.

@robkooper
robkooper / flavor.gp.kube.sh
Created October 24, 2022 14:21
convert kube cluster from m1 to gp flavors
#!/bin/bash
. ~/Work/radiant/openstack.sh
export OS_CLOUD=cinet
kubectx cinet
for n in $(kubectl get no | awk '/controlplane/ { print $1}'); do
echo "-- $n"
FLAVOR=$(openstack server show $n | awk '/flavor/ { print $4}')
@robkooper
robkooper / qr.sh
Created December 12, 2022 15:35
Script to create a QR code using qrcode-tiger.com
!/bin/bash
# https://www.qrcode-tiger.com/api-documentation
# /api/qr/static
API_KEY="SECRET"
FRAME_COLOR="#054080"
EYE_COLOR="#ff6500"
@robkooper
robkooper / rebind_floating_ip.py
Last active February 15, 2026 20:20
openstack rebind
#!/usr/bin/env python3
"""
OpenStack Floating IP Rebinding Script
This script removes and re-adds a floating IP to a VM while
preserving the MAC address of the interface.
Usage:
python rebind_floating_ip.py --vm <vm_name> --floating-ip <ip> --network <network_name> [--dry-run]