diff --git a/helmfiles/apps/default/metallb/metallb.yaml.gotmpl b/helmfiles/apps/default/metallb/metallb.yaml.gotmpl index c005fb4..a94e357 100644 --- a/helmfiles/apps/default/metallb/metallb.yaml.gotmpl +++ b/helmfiles/apps/default/metallb/metallb.yaml.gotmpl @@ -3,4 +3,4 @@ configInline: - name: default protocol: layer2 addresses: - - 172.17.0.1-172.17.255.255 + - {{ requiredEnv "KINDADM_KIND_NETW_SHORT" }}.0.1-{{ requiredEnv "KINDADM_KIND_NETW_SHORT" }}.255.255 diff --git a/kindadm b/kindadm index 9215a67..aee55c9 100755 --- a/kindadm +++ b/kindadm @@ -368,6 +368,9 @@ if [[ "$HELM_VER" == 2.*.* ]]; then echo -e "\n${LIGHT_GREEN}\u2713${NC} Tiller Server - ${LIGHT_GREEN}deployed and ready${NC}." fi +# Get KinD network +export KINDADM_KIND_NETW_SHORT=$(docker network inspect kind -f "{{(index .IPAM.Config 0).Subnet}}" | cut -d '.' -f1,2) + # Deploy default apps echo -e "\n${LIGHT_GREEN}Deploying default apps...${NC}" create_k8s_ns "default"