simple-kubernetes-webhook icon indicating copy to clipboard operation
simple-kubernetes-webhook copied to clipboard

Generate self-sign cert with SHA256

Open anattapol opened this issue 2 years ago • 1 comments

Summary

When apply a pod, I faced this error.

$ kubectl -n $ns apply -f dev/manifests/pods/bad-name.pod.yaml
Error from server (InternalError): error when creating "dev/manifests/pods/bad-name.pod.yaml": Internal error occurred: failed calling webhook "simple-kubernetes-webhook.acme.com": failed to call webhook: Post "https://simple-kubernetes-webhook.default.svc:443/mutate-pods?timeout=2s": x509: certificate signed by unknown authority (possibly because of "x509: cannot verify signature: insecure algorithm SHA1-RSA (temporarily override with GODEBUG=x509sha1=1)" while trying to verify candidate authority certificate "simple-kubernetes-webhook")

The cert used the insecure algorithm SHA1-RSA. That will be blocked by crypto/x509. https://github.com/golang/go/issues/41682

Requirements (place an x in each [ ])

The following point can be removed after setting up CI (such as Travis) with coverage reports (such as Codecov)

  • [ ] I've written tests to cover the new code and functionality included in this PR.

The following point can be removed after setting up a CLA reporting tool such as cla-assistant.io

anattapol avatar Feb 26 '23 21:02 anattapol

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Feb 26 '23 21:02 CLAassistant