# How do you get cert-manager to create and manage a Certificate for an Ingress automatically?

cert-manager, Hard (Expert), Integration. https://k8wiz.com/uquiz/how-do-you-get-cert-manager-to-create-and-manage-a-certificate-for-an-ingress-automatically

- A. Add a cert-manager.io/enabled: "true" label to the Ingress
- B. Create a ClusterIssuer with the same name as the Ingress class
- C. Add a cert-manager.io/cluster-issuer annotation and a tls section
- D. Set spec.ingressClassName to cert-manager on the Ingress

**Answer:** Add a cert-manager.io/cluster-issuer annotation and a tls section

**Explanation:** cert-manager's ingress-shim watches Ingresses with those annotations. For each tls entry it creates a Certificate for the listed hosts, stored in the secretName that the Ingress controller already reads, and it keeps the Certificate in sync when you edit the Ingress. Gateway API Gateways work the same way when that support is enabled.
