-
Notifications
You must be signed in to change notification settings - Fork 386
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
crane-agent pod crashing with kind k8s 1.24 #345
Comments
The cert used insecure algorithm SHA1-RSA.
And kind v0.14.0 is built by Go 1.18.2. So you need to renew the cert by SHA256 if you want to use the crane on kind v0.14.0. We will fix it before the next release.
Here are some tips to renew the cert.
crane/deploy/scripts/gencerts.sh Lines 1 to 14 in 4ba0b2c
# Result
workdir=${1}
keydir=$workdir/keys
mkdir -p $keydir
echo Generating the CA cert and private key to ${keydir}
openssl req -days 3650 -sha256 -nodes -new -x509 -keyout ${keydir}/ca.key -out ${keydir}/ca.crt -subj "/CN=crane"
echo Generating the private key for the webhook server
openssl genrsa -out ${keydir}/tls.key 2048
# Generate a Certificate Signing Request (CSR) for the private key, and sign it with the private key of the CA.
echo Signing the CSR, and generating cert into ${keydir}
openssl req -new -sha256 -key ${keydir}/tls.key -subj "/CN=craned.crane-system.svc" -config ${workdir}/scripts/webhook.csr \
| openssl x509 -req -sha256 -days 3650 -CA ${keydir}/ca.crt -CAkey ${keydir}/ca.key -CAcreateserial -out ${keydir}/tls.crt -extensions v3_req -extfile ${workdir}/scripts/webhook.csr
crane/deploy/craned/deployment.yaml Lines 79 to 87 in 4ba0b2c
All crane/deploy/craned/webhooks.yaml Line 11 in 4ba0b2c
|
A temp and simple fix way is just let SHA1-RSA running. docker exec -ti kind-control-plane bash
root@kind-control-plane:/# apt update && apt install vim -y
root@kind-control-plane:/# vim /etc/kubernetes/manifests/kube-apiserver.yaml
Add this:
env:
- name: GODEBUG
value: x509sha1=1 |
Describe the bug
crane-agent pod crashing with k8s 1.24
Reproduce steps
Expected behavior
no crash on k8s 1.24
and it works fine with k8s 1.23.6
Screenshots
the crane-agent pod has following error log
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: