Google Cloud - TLS certificate not ready (Kubernetes)

1/3/2020

I'm trying to run TLS certificate on Google Cloud Engine to enable HTTPS on my domain. For some reason after inspecting the certificate in google I see that this is not ready though.

Here's my certification object:

apiVersion: certmanager.k8s.io/v1alpha1
kind: Certificate
metadata:
  name: admin-panel-com-tls
spec:
  secretName: api-tls-crt-secret
  issuerRef:
    name: letsencrypt-prod-admin-panel
    kind: ClusterIssuer
  commonName: admin-panel.staging.test.com
  dnsNames:
    - admin-panel.staging.test.com
  acme:
    config:
      - http01:
          ingressClass: nginx
        domains:
          - admin-panel.staging.test.com

And my cert issuer object:

apiVersion: certmanager.k8s.io/v1alpha1
kind: ClusterIssuer
metadata:
  name: letsencrypt-prod
spec:
  acme:
    server: https://acme-v02.api.letsencrypt.org/directory
    email: 'test@email.com'
    privateKeySecretRef:
      name: letsencrypt-prod-admin-panel
    http01: {}

My ingress:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: admin-panel-ingress
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/use-regex: "true"
    certmanager.k8s.io/cluster-issuer: letsencrypt-prod-admin-panel
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
  tls:
    - hosts:
        - admin-panel.staging.test.com
      secretName: api-tls-crt-secret
  rules:
    - host: admin-panel.staging.test.com
      http:
        paths:
          - path: /.*
            backend:
              serviceName: admin-panel-service
              servicePort: 3000
          - path: /api/.*
            backend:
              serviceName: admin-panel-server-service
              servicePort: 3001
          - path: /auth/.*
            backend:
              serviceName: admin-panel-server-service
              servicePort: 3001

What am I missing here? Also after putting my dns to ingress config I'm getting: default backend - 404

-- Murakami
acme
google-cloud-platform
kubernetes
lets-encrypt
ssl

0 Answers