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

failed to get register command, err: no CA certificates found in kubeconfig #5738

Closed
chaosi-zju opened this issue Oct 24, 2024 · 0 comments · Fixed by #5739
Closed

failed to get register command, err: no CA certificates found in kubeconfig #5738

chaosi-zju opened this issue Oct 24, 2024 · 0 comments · Fixed by #5739
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@chaosi-zju
Copy link
Member

What happened:

Execute karmadactl token create command failed (Karmada is installed by local up script), you can see:

$ karmadactl token create --print-register-command --kubeconfig ~/.kube/karmada.config --karmada-context karmada-apiserver
error: failed to get register command, err: no CA certificates found in kubeconfig

the cluster is set insecure-skip-tls-verify=true in karmada config, that is a insecure config:

$ cat ~/.kube/karmada.config
apiVersion: v1
clusters:
- cluster:
    insecure-skip-tls-verify: true
    server: https://172.18.0.4:5443
  name: karmada-apiserver
...

What you expected to happen:

$ karmadactl token create --print-register-command --kubeconfig ~/.kube/karmada.config --karmada-context karmada-apiserver                                                                                
karmadactl register 172.18.0.4:5443 --token yqnbkt.muyyaah5omv1s24d --discovery-token-ca-cert-hash sha256:4f12a0f772cdaecfb7e150992f627485485d75922ddae5080bcb50a79bf22971

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Karmada version:
  • kubectl-karmada or karmadactl version (the result of kubectl-karmada version or karmadactl version):
  • Others:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant