File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -110,15 +110,37 @@ if [ ! -f "kind/k8s/kind-config.yaml" ]; then
110
110
# exit 1
111
111
fi
112
112
113
+ # Attempt to create cluster traditionally
113
114
if kind create cluster \
114
115
--config kind/k8s/kind-config.yaml \
115
116
--name egitangu-local-cluster \
116
117
--image kindest/node:v1.28.0 \
117
118
--wait 60s; then
118
119
log_success " Kind cluster created successfully ${TICK} "
119
120
else
120
- log_error " Failed to create Kind cluster ${CROSS} "
121
- # exit 1
121
+ log_warning " Traditional cluster creation failed, trying experimental approach..."
122
+
123
+ # Create docker network for Kind with IPv4 only (suppress errors if network exists)
124
+ docker network create -d bridge \
125
+ -o " com.docker.network.bridge.enable_ip_masquerade=true" \
126
+ -o " com.docker.network.driver.mtu=1500" \
127
+ --subnet=172.18.0.0/16 \
128
+ kind 2> /dev/null || true
129
+
130
+ # Try experimental way
131
+ export KIND_EXPERIMENTAL_PROVIDER=docker
132
+ if KIND_EXPERIMENTAL_DOCKER_NETWORK=kind \
133
+ DOCKER_DEFAULT_PLATFORM=linux/amd64 \
134
+ kind create cluster \
135
+ --config kind/k8s/kind-config.yaml \
136
+ --name egitangu-local-cluster \
137
+ --image kindest/node:v1.28.0 \
138
+ --wait 60s; then
139
+ log_success " Kind cluster created successfully using experimental approach ${TICK} "
140
+ else
141
+ log_error " Failed to create Kind cluster using both approaches ${CROSS} "
142
+ exit 1
143
+ fi
122
144
fi
123
145
124
146
# Verify cluster is ready
You can’t perform that action at this time.
0 commit comments