0

我正在尝试在 Google Cloud Engine 上运行 TLS 证书以在我的域上启用 HTTPS。出于某种原因,在谷歌检查证书后,我发现这还没有准备好。

这是我的认证对象:

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

我的证书颁发者对象:

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: {}

我的入口:

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

我在这里想念什么?同样在将我的 dns 放入入口配置后,我得到:default backend - 404

4

0 回答 0