-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Milestone
Description
# karmadactl register karmada.example.com:5443 --token ***REDACTED***--discovery-token-ca-cert-hash sha256:***REDACTED*** --cluster-name=my-cluster
[preflight] Running pre-flight checks
[preflight] All pre-flight checks were passed
[karmada-agent-start] Waiting to perform the TLS Bootstrap
Unable to connect to the server: dial tcp: lookup karmada-apiserver.karmada-system.svc.cluster.local on 127.0.0.53:53: no such host
Despite the register
command being given the API endpoint of karmada.example.com:5443
, the command persists in attempting to connect to karmada-apiserver.karmada-system.svc.cluster.local
instead, which is not resolvable because the 2 clusters are not in the same network.
It looks like there was a previous attempt to address this in #4562 but it appears that perhaps that fix was incomplete as there is another place in the code that references the cluster info and ignores the user provided one.
What you expected to happen:
register
should always use the user-provided API endpoint
How to reproduce it (as minimally and precisely as possible):
- deploy karmada in cluster A with load balancer pointing to
karmada.example.com
- generate a token for setting up a pull mode cluster:
karmadactl token create --print-register-command=true
- attempt to run the ccommand from cluster B:
karmadactl register karmada.example.com:5443 --token ***REDACTED***--discovery-token-ca-cert-hash sha256:***REDACTED*** --cluster-name=my-cluster
Environment:
- Karmada version: 1.15.0
- kubectl-karmada or karmadactl version (the result of
kubectl-karmada version
orkarmadactl version
): 1.15.1, tried using build frommaster
as well) - Others:
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Type
Projects
Status
No status