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

Create virtual-env-operator deployment fail because of new version of k8s #29

Closed
chenweijia0925 opened this issue Mar 26, 2021 · 5 comments

Comments

@chenweijia0925
Copy link

After the new version of k8s is built with Go 1.15 version, it does not support X509 certificates

The following is the error message:
Error creating: Internal error occurred: failed calling webhook "webhook-server.kt-virtual-environment.svc": Post "https://webhook-server.kt-virtual-environment.svc:443/inject?timeout=30s": x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0

@markWord
Copy link

想问下这个后面怎么解决的?

@linfan
Copy link
Collaborator

linfan commented Apr 16, 2021

需要更新一下证书生成文档和kt-env的Webhook组件默认证书,近期会更新

@xiongxiaoxx
Copy link

有进展吗?

@markWord
Copy link

markWord commented Jul 15, 2021

有进展吗?

我是这样弄的证书,就ok了
命令:
`openssl req -nodes -new -x509 -days 3650 -keyout ca.key -out ca.crt -subj "/CN=webhook-server.kt-virtual-environment.svc" -config ssl.conf # Generate the private key for the webhook server

openssl genrsa -out webhook-server-tls.key 2048 # Generate a Certificate Signing Request (CSR) for the private key, and sign it with the private key of the CA.

openssl req -new -key webhook-server-tls.key -subj "/CN=webhook-server.kt-virtual-environment.svc"
| openssl x509 -req -days 3650 -CA ca.crt -CAkey ca.key -CAcreateserial -out webhook-server-tls.crt -extensions req_ext -extfile ssl.conf`

`tls_crt_b64="$(openssl base64 -A < webhook-server-tls.crt)"

tls_key_b64="$(openssl base64 -A < webhook-server-tls.key)"

ca_pem_b64="$(openssl base64 -A < ca.crt)"`

ssl.conf文件(无法上传conf文件,后缀改成了txt):
ssl.txt

@linfan
Copy link
Collaborator

linfan commented Sep 18, 2021

v0.6.0 已修复

@linfan linfan closed this as completed Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants