Closed badri closed 5 years ago
I have the same issue with openshift v3.11:
oc v1.5.0+031cbe4 kubernetes v1.5.2+43a9be4 features: Basic-Auth GSSAPI Kerberos SPNEGO
Server https://openshift:8443 openshift v3.11.0+92b7c41-132 kubernetes v1.11.0+d4cacc0
The issue seems to be on the issuer:
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=openshift-signer@1552691887
Validity
Not Before: Mar 15 23:30:37 2019 GMT
Not After : Mar 14 23:30:38 2021 GMT
The issuer should be let's encrypt....
@badri the certs from staging endpoint are still invalid, unless you use live - https://github.com/tnozicka/openshift-acme#staging
@thibserot I'd need more information to help you sort it out. e.g. the url (or part of it) that you are trying to reach, oc get route -o yaml
(with keys redacted), acme controller logs
@tnozicka perfect. Thanks for your response man. I'll try with live endpoint and update here.
@tnozicka I finally managed to get it running by destroying my cluster and re-creating...Some secrets must have been laying around and prevented the update of certificate to happen! Thanks for the reply
Actually I may have spoken a bit too fast as my domain is still using invalid certificate...Is there a way to force the re-issue of the certificate from your pod?
oc get route landing-com -o yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
annotations:
kubernetes.io/tls-acme: "true"
kubernetes.io/tls-acme-awaiting-authorization-owner: https://acme-v01.api.letsencrypt.org/acme/reg/xxxxxxx
creationTimestamp: 2019-03-23T23:26:15Z
labels:
app: landing
template: nginx-https
name: landing-com
namespace: hex-production
resourceVersion: "1159358"
selfLink: /apis/route.openshift.io/v1/namespaces/hexagone-production/routes/landing-com
uid: xxxxxxxxxxxx
spec:
host: xxxxi.com
port:
targetPort: 8081-tcp
tls:
certificate: |
-----BEGIN CERTIFICATE-----
xxxxxxxxxxxxxxxxxxxxxxxxx
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
xxxxxxxxxxxxxxxxxxxxxxxxxx
-----END CERTIFICATE-----
insecureEdgeTerminationPolicy: Redirect
key: |
-----BEGIN RSA PRIVATE KEY-----
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-----END RSA PRIVATE KEY-----
termination: edge
to:
kind: Service
name: landing
weight: 100
wildcardPolicy: None
status:
ingress:
- conditions:
- lastTransitionTime: 2019-03-23T23:26:15Z
status: "True"
type: Admitted
host: hexagone-ai.com
routerName: router
wildcardPolicy: None
And here are the acme logs:
Started syncing Route "hexagone-production/landing-com" (2019-03-23 23:29:10.254080212 +0000 UTC m=+548219.840523563) Created authorization "https://acme-v01.api.letsencrypt.org/acme/authz/KKtVlSXcHEu7CF_qkuCNkYPbQqiugXfZrRQ-__4IF_o" for Route hexagone-production/landing-com Authorization "https://acme-v01.api.letsencrypt.org/acme/authz/KKtVlSXcHEu7CF_qkuCNkYPbQqiugXfZrRQ-__4IF_o" for Route hexagone-production/landing-com is already valid Finished syncing Route "hexagone-production/landing-com" (491.888711ms) Updating Route from hexagone-production/landing-com UID=0de0c90f-4dc3-11e9-8528-002590265614 RV=1159333 to hexagone-production/landing-com UID=0de0c90f-4dc3-11e9-8528-002590265614,RV=1159335 Started syncing Route "hexagone-production/landing-com" (2019-03-23 23:29:10.746044918 +0000 UTC m=+548220.332488291) Route "hexagone-production/landing-com": authorization state is "valid" Authorization "https://acme-v01.api.letsencrypt.org/acme/authz/KKtVlSXcHEu7CF_qkuCNkYPbQqiugXfZrRQ-__4IF_o" for Route hexagone-production/landing-com successfully validated Route "hexagone-production/landing-com" - created certificate available at https://acme-v01.api.letsencrypt.org/acme/cert/03af73ae0d9a07c248a971c3183f029fe98c Updating Route from hexagone-production/landing-com UID=0de0c90f-4dc3-11e9-8528-002590265614 RV=1159335 to hexagone-production/landing-com UID=0de0c90f-4dc3-11e9-8528-002590265614,RV=1159358 Event(v1.ObjectReference{Kind:"Route", Namespace:"hexagone-production", Name:"landing-com", UID:"0de0c90f-4dc3-11e9-8528-002590265614", APIVersion:"route.openshift.io", ResourceVersion:"1159358", FieldPath:""}): type: 'Normal' reason: 'AcmeCertificateProvisioned' Successfully provided new certificate Finished syncing Route "hexagone-production/landing-com" (10.524994928s) Started syncing Route "hexagone-production/landing-com" (2019-03-23 23:29:21.27108878 +0000 UTC m=+548230.857532136) Finished syncing Route "hexagone-production/landing-com" (95.837757ms) 86] github.com/tnozicka/openshift-acme/pkg/cmd/cmd.go:257: forcing resync Updating Route from hexagone-production/landing-com UID=0de0c90f-4dc3-11e9-8528-002590265614 RV=1159358 to hexagone-production/landing-com UID=0de0c90f-4dc3-11e9-8528-002590265614,RV=1159358 Started syncing Route "hexagone-production/landing-com" (2019-03-23 23:31:19.098073897 +0000 UTC m=+548348.684517242) Finished syncing Route "hexagone-production/landing-com" (2.807602ms)
I don't see any error in the logs...The only issue is that the certifiacte isn't signed by letsencrypt but by openshift....
And I believe my error was the first time i tried to run the acme pod i already had setup the route with the annotation but i hadn't properly setup permissions on the serviceaccount and I believe that's when the bad certificate was created...Since then I've been able to properly secure numerous route without issue...Just this one that stays stuck even after a full re-install from the openshift cluster...So I believe that force re-issue of the certificate could solve the problem...Just need to figure out how I can do it from the ACME Pod!
Any hints welcome! Cheers Thibault
@tnozicka I can confirm that this now works with openshift 3.11 cluster.
I don't see any error in the logs...The only issue is that the certifiacte isn't signed by letsencrypt but by openshift....
if there is no cert in the tls section you get the default one from the router
And I believe my error was the first time i tried to run the acme pod i already had setup the route with the annotation but i hadn't properly setup permissions on the serviceaccount and I believe that's when the bad certificate was created...Since then I've been able to properly secure numerous route without issue...Just this one that stays stuck even after a full re-install from the openshift cluster...So I believe that force re-issue of the certificate could solve the problem...Just need to figure out how I can do it from the ACME Pod!
you can check the certificate using openssl (openssl s_client -connect <domain>:443
)
I guess it could be still provisioned from staging.
To get a refresh, delete the tls certs from the route and kubernetes.io/tls-acme-awaiting-authorization-owner
annotation.
glad it works for you now ;)
I'm using OpenShift Origin 3.11.
I installed the cluster-wise staging configuration.
And provisioned a new route.
But I still don't get a valid certificate.
Am I missing any step?