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

sealer v0.9.[2,3] run invalid: x509: certificate #2170

Closed
hxfs opened this issue Apr 6, 2023 · 3 comments · Fixed by #2211
Closed

sealer v0.9.[2,3] run invalid: x509: certificate #2170

hxfs opened this issue Apr 6, 2023 · 3 comments · Fixed by #2211
Assignees
Labels
kind/bug Something isn't working

Comments

@hxfs
Copy link

hxfs commented Apr 6, 2023

What happen?

安装过程中出现下面报错,查看节点中的证书如图, 出现未知字符串,导致 kubeadm join failed

apiVersion: sealer.cloud/v2
kind: Cluster
metadata:
name: longbridge
spec:
image: sealerio/kubernetes:v1.22.15
ssh:
user: ubuntu
passwd: xxxx
hosts:
- ips: [ 10.10.0.74,10.10.0.72,10.10.0.73 ]
roles: [ master ]
taints:
- node-role.kubernetes.io/master=value:NoSchedule
- ips: [ 10.10.0.71,10.10.0.69,10.10.0.68 ]
roles: [ node ]

image

Relevant log output?

preflight] Running pre-flight checks
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
[preflight] Running pre-flight checks before initializing the new control plane instance
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
[download-certs] Downloading the certificates in Secret "kubeadm-certs" in the "kube-system" Namespace
[certs] Using certificateDir folder "/etc/kubernetes/pki"
[certs] Using the existing "etcd/healthcheck-client" certificate and key
[certs] Using the existing "apiserver-etcd-client" certificate and key
, not ip-10-10-0-72-cn-hangzhoulane-prepare/certs: error creating PKI assets: failed to write or validate certificate "etcd-peer": certificate etcd/peer is invalid: x509: certificate is valid for localhost, ip-10-10-0-72-cn-hangzhou
To see the stack trace of this error execute with --v=5 or higher

What you expected to happen?

正常安装

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

No response

Anything else we need to know?

No response

What is the version of Sealer you using?

{"gitVersion":"v0.9.3","gitCommit":"a51d0ec","buildDate":"2023-03-31 05:58:58","goVersion":"go1.17.13","compiler":"gc","platform":"linux/amd64"}

What is your OS environment?

Ubuntu 22.04

What is the Kernel version?

5.15.0-69-generic #76-Ubuntu

Other environment you want to tell us?

  • Cloud provider or hardware configuration:
  • Install tools:
  • Others:
@hxfs hxfs added the kind/bug Something isn't working label Apr 6, 2023
@kakaZhou719
Copy link
Member

@hxfs , it looks like sealer set invalid hostname string to Subject: CN=${hostname}. i will try to fix it today.

@kakaZhou719 kakaZhou719 added this to the release-0.10.0 milestone Apr 7, 2023
@starnop
Copy link
Collaborator

starnop commented May 5, 2023

@hxfs You can try sealer delete --all first and then reinstall it to try it out. Also, for more information, you can turn on debug mode when reinstalling by using sealer run --debug.

@starnop
Copy link
Collaborator

starnop commented May 5, 2023

And please note the cluster name cannot be modified which should be my-cluster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants