I tried to use Google Managed Certificate (not through k8s) in Ingress.
If Ingress is in default namespace, everything works fine using ingress.gcp.kubernetes.io/pre-shared-cert: my-cert-name
annotation.
However, if Ingress is in a namespace, it looks for a certificate named my-namespace/my-cert-name
. But it's impossible to create a certificate with /
in its name.
Using GKE k8s ManagedCertificate everything works fine. How to make it work with a non-k8s ManagedCertificate?
UPDATE: we use Terraform to manage SSL certificates, using google_compute_managed_ssl_certificate
resource. We used GKE with Ingress, and tried to use that certificate with it. If Ingress is in default namespace -- everything works fine. If Ingress is in some other namespace -- it's impossible to use that certificate, because Ingress looks for certificate named namespacename/certname
instead of certname
.
This has been suggested, but is currently not supported, you can see the progress here.
It is possible to sync secrets across namespaces using cert-manager but this only works for wildcard certificates.
You would have to move the ingress into the default namespace or use a different certificate provider.