Home > database >  Kubernetes Ingress Controller Fake Certificate error
Kubernetes Ingress Controller Fake Certificate error

Time:08-26

I just installed ingress controller in an aks cluster using this deployment resource :

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.3.0/deploy/static/provider/cloud/deploy.yaml

specific for azure.

So far everything works fine the issue i am having is, i get this error on my certificate that :

Kubernetes Ingress Controller Fake Certificate

i Know i followed all steps as i should, but i can figure out why my certificate says that. I would appreciate if anyone can help guide on a possible fix for the issue.

issuer manifest

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: "nginx"
  name: TargetPods-6dc98445c4-jr6pt
spec:
  tls:
  - hosts:
    - test.domain.io
    secretName: TargetPods-tls
  rules:
  - host: test.domain.io
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: TargetPod-6dc98445c4-jr6pt
            port:
              number: 80

Thanks in advance

CodePudding user response:

The Kubernetes Ingress Controller Fake Certificate is used by default if there is a problem getting/using the certificate desired for an ingress. For example:

  • Certificate contents aren't suitable
  • Secret holding certificate doesn't exist (wrong namespace, delayed certificate request etc.)

It would be helpful to add the YAML manifests for your ingress resource and describe how you've created/added your TLS certificate that is to be used with the ingress, and I can hopefully improve my answer to help a bit more.

CodePudding user response:

You're seeing this as it is the default out of the box TLS certificate. You should replace this with your own certificate.

Here is some information in the documentation

You essentially want to create a TLS certificate (try this method if you are unfamiliar) and then add --default-ssl-certificate=default/XXXXX-tls in the nginx-controller deployment in you yaml. You can add this as an argument, search for "/nginx-ingress-controller" in your yaml and that'll take you to the relevant section.

  • Related