Skip to content

Instantly share code, notes, and snippets.

View velcrine's full-sized avatar
💭
🤙 :

velcrine

💭
🤙 :
  • WaterGist
  • Bengaluru
View GitHub Profile
@seguidor777
seguidor777 / kind_static_ips.sh
Last active January 23, 2023 07:48
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"