kubekey
kubekey copied to clipboard
Allinone: kubectl unable to connect to the server: x509: certificate signed by unknown authority
What is version of KubeKey has the issue?
master
What is your os environment?
deepin 15.11
KubeKey config file
sudo ./kk create cluster --with-kubernetes v1.21.5 --yes --container-manager docker --with-local-storage --with-kubesphere v3.2.1
A clear and concise description of what happend.
Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")
Relevant log output
Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")
Additional information
No response
I had similar issue installing Air-gapped installation
https://kubesphere.io/docs/installing-on-linux/introduction/air-gapped-installation/
I temporarily solved it by using:
-subj "/CN=dockerhub.alitech.local" -addext "subjectAltName = DNS:dockerhub.alitech.local"
This is complete command: openssl req -newkey rsa:4096 -nodes -sha256 -keyout certs/domain.key -subj "/CN=dockerhub.alitech.local" -addext "subjectAltName = DNS:dockerhub.alitech.local" -x509 -days 36500 -out certs/domain.crt
For now, a solution:
cp /etc/kubernetes/admin.conf $HOME/.kube/config
And this issue can be a good-first-issue.
/good-first-issue
@24sama: This request has been marked as suitable for new contributors.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue
command.
In response to this:
And this issue can be a good-first-issue.
/good-first-issue
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/assign
[WeOpen Star]I would like to help