Skip to content

Instantly share code, notes, and snippets.

View seguidor777's full-sized avatar
🦀

Jorge Luna seguidor777

🦀
View GitHub Profile
@seguidor777
seguidor777 / kind_static_ips.sh
Last active September 10, 2024 09:32
This script assign static IP to all nodes of a kind cluster
#!/bin/bash
set -e
# Workaround for https://github.com/kubernetes-sigs/kind/issues/2045
all_nodes=$(kind get nodes --name "${CLUSTER_NAME}" | tr "\n" " ")
declare -A nodes_table
ip_template="{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}"
echo "Saving original IPs from nodes"