Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

velad multi cluster failed #28

Closed
dpengpeng opened this issue Jun 18, 2022 · 4 comments · Fixed by #30
Closed

velad multi cluster failed #28

dpengpeng opened this issue Jun 18, 2022 · 4 comments · Fixed by #30

Comments

@dpengpeng
Copy link

I created another k3d in window's docker-desktop ,but when I join default cluster, it happend a fail:

C:\Windows\system32>vela cluster join C:\Users\dpp.kube\velad-cluster-sub-cluster-internal
Error: failed to ensure vela-system namespace installed in cluster k3d-velad-cluster-sub-cluster: failed to check if namespace vela-system exists: dial tcp: lookup host.docker.internal on 10.43.0.10:53: no such host
failed to ensure vela-system namespace installed in cluster k3d-velad-cluster-sub-cluster: failed to check if namespace vela-system exists: dial tcp: lookup host.docker.internal on 10.43.0.10:53: no such host

I use velad 1.4.2 in window 10.
Thank you.

@chivalryq
Copy link
Member

This is because K3d in v5.4.1 has new behavior when write kubeconfig in Windows. Instead of 0.0.0.0, K3d write host.docker.internal in default kubeconfig (the output of velad kubeconfig --host).
Internal kubeconfig(output of velad kubeconfig --internal) is generated from default kubeconfig.host.docker.internal is not known by vela-core pod. So it fails when vela cluster join.

Temporarily, you can edit the C:\Users\dpp.kube\velad-cluster-sub-cluster-internal to go on the procedure.

  1. Run docker network inspect k3d-velad | grep k3d-velad-cluster-worker-server-0 -C 3|grep IPv4Address. The output like "IPv4Address": "172.19.0.6/16". Then the internal IP of worker cluster is 172.19.0.6
  2. Replace host.docker.internal:6444 with 172.19.0.6:6443 (Note: the port is 6443)
  3. Try vela cluster join C:\Users\dpp.kube\velad-cluster-sub-cluster-internal again.

@chivalryq
Copy link
Member

Let's close it after fix this problem.

@chivalryq chivalryq reopened this Jun 19, 2022
@dpengpeng
Copy link
Author

Thank you very much. Your method should solve the problem of principle. Fortunately, I used a simple method, which is to delete the docker configuration in the path(C:\Windows\System32\drivers\etc\hosts), and then restart docker-desktop. All is well.

@chivalryq
Copy link
Member

OK, I'm glad that helps! But I mean let's keep this open until it is fixed in code. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants