Closed pengmingming closed 4 years ago
@superseb Hi,Please help me!
I think the error is accurate, when signing the certificate, the SANs won't be used by default. You will need to configure it so that the certificate includes those, see https://gist.github.com/croxton/ebfb5f3ac143cd86542788f972434c96 and https://stackoverflow.com/questions/30977264/subject-alternative-name-not-present-in-certificate.
Let me know if that solves it for you.
In general, I think we should add a pre-check for certificates before deploying them in case of custom-certs to make sure the certificates are accurate to the cluster.yml
before deploying.
This issue/PR has been automatically marked as stale because it has not had activity (commit/comment/label) for 60 days. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
RKE version:
Docker version: (
docker version
,docker info
preferred)Operating system and kernel: (
cat /etc/os-release
,uname -r
preferred)Type/provider of hosts: (VirtualBox/Bare-metal/AWS/GCE/DO)
cluster.yml file:
Steps to Reproduce: 1.
rke cert generate-csr
2.
openssl genrsa -out kube-ca-key.pem 2048
3.
openssl req -x509 -new -nodes -key kube-ca-key.pem -days 10000 -out kube-ca.pem -subj "/CN=kube-ca"
4.
openssl req -x509 -nodes -days 10000 -newkey rsa:2048 -keyout ./cluster_certs/kube-service-account-token-key.pem -out ./cluster_certs/kube-service-account-token.pem
5.
openssl x509 -req -days 10000 -sha256 -CA ./cluster_certs/kube-ca.pem -CAkey ./cluster_certs/kube-ca-key.pem -CAcreateserial -in ./cluster_certs/kube-apiserver-csr.pem -out ./cluster_certs/kube-apiserver.pem
(forearch)6.
tree cluster_certs/
7.
rke up --custom-certs
Results: 1.
docker ps -a
2.
docker logs kube-apiserver
3.certificate kube-ca.zip