Closed kubefay closed 3 months ago
That's weird, we run the script multi times everyday on CI environment.
Could you please share the output?
The output: + kubectl config rename-context kind-member1 member1 --kubeconfig=/root/.kube/members.config error: cannot rename the context "kind-member1", it's not in /root/.kube/members.config
More to say: util::create_cluster execute async, if the funtions execute slow, the later function will delete the config file generated by previous one.
we could simulate the scenario that executed flow by changing the utils.sh line 436 to:
kind delete cluster --name="${cluster_name}" >> "${log_path}"/"${cluster_name}".log 2>&1 && kind create cluster --name "${cluster_name}" --kubeconfig="${kubeconfig}" --image="${kind_image}" --config="${cluster_config}"
(remove nohup and the "&" to make it sync)
@RainbowMango Maybe you can close this issue now. The script has be updated. https://github.com/karmada-io/karmada/blob/dca9c36d5a4289363922fb24dbd6a8e551b9554b/hack/util.sh#L474
ok. thanks. /close
@RainbowMango: Closing this issue.
What happened:
clone main brach, execute ./hack/local-up-karmada.sh the .kube/members.config does not have memer1,member2
root cause is that hack/utils.sh line 435 del the config before start clusters. After delete the line , everything goes well