<p>I have 4 yaml file</p>
<ol>
<li>Deployment.yaml</li>
<li>Service.yaml</li>
<li>Ingress.yaml</li>
<li>issuer.yaml</li>
</ol>
<p>I want to use letsencrypt-prod for my service for certification . But it doesn't work.</p>
<p>When I use to be sure ingress is working or issuer is working both of them are done!</p>
<pre><code>kubectl get ing
</code></pre>
<pre><code>kubectl get issuer

</code></pre>
<p>But when I run:</p>
<pre><code>kubectl get cert
</code></pre>
<p>Cert is not readt during 2 days . Like below:
<a href="https://i.stack.imgur.com/Z6SwB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z6SwB.jpg" alt="enter image description here" /></a>
it creates problem like below. certification is not binding mandrakee.xyz.Mandrakee.xyz looks still not secure! how can I make my website secyre via cert manager?
Deployment.yaml:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: echo-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: echo-server
  template:
    metadata:
      labels:
        app: echo-server
    spec:
      containers:
      - name: httpapi-host
        image: jmalloc/echo-server
        imagePullPolicy: Always
        resources:
          requests:
            memory: &quot;128Mi&quot;
            cpu: &quot;500m&quot;
        ports:
        - containerPort: 80                                     

</code></pre>
<p>Service.yaml:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: echo-service
spec:
  ports:
    - name: http-port
      port: 80
      targetPort: 8080
  selector:
    app: echo-server
</code></pre>
<p>Ingress.yaml:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: ambassador
    cert-manager.io/issuer: letsencrypt-prod
  name: test-ingress
spec:
  tls:
    - hosts:
        - mandrakee.xyz
      secretName: letsencrypt-prod 
  rules:
  - host: mandrakee.xyz
    http:
      paths:
      - backend:
          service:
            name: echo-service
            port: 
              number: 80
        path: /
        pathType: Prefix
</code></pre>
<p>issuer.yaml:</p>
<pre><code>apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
  name: letsencrypt-prod
spec:
  acme:
    email: ykaratoprak@sphereinc.com
    server: https://acme-v02.api.letsencrypt.org/directory
    privateKeySecretRef:
      name: letsencrypt-prod
    solvers:
    - dns01:
        digitalocean:
          tokenSecretRef:
            name: digitalocean-dns
            key: ce28952b5b4e33ea7d98de190f3148a7cc82d31f030bde966ad13b22c1abc524
</code></pre>

loki
<p>If you have setup your issuer correctly, which you have assured us, you will see in your namespace a pod belonging to cert manager. This creates a pod that will validate that the server requesting the certificate resolves to the DNS record.</p>
<p>In your case, you would need to point your DNS towards your ingress.</p>
<p>If this is done successfully, then the next stage of debugging is to validate that both 443 and 80 can be resolved. The Validation Pod created by Cert Manager uses port 80 to validate the communication. A common mistake people make is assuming that they will only use port 443 for ssl and disable 80 for security reasons to find out later that letsencrypt can't validate the hostname without port 80.</p>
<p>Otherwise, the common scenario is that cert-manager is installed in the namespace cert-manager and so you should check the logs of the manager. This will provided a limited amount of logs and can be sometimes cryptic to finding the remedy to your issues.</p>
<p>To find the direct error, the pod spawned by cert-manager in the namespace you have deployed the ingress is a good place to focus.</p>
<p>A test I would run is to setup the ingress with both 80 and 443, if you use your domain from your browser you should get some invalid kubernetes generic certificates response on the port 443 and just &quot;Not Found&quot; on port 80. If this is successful, it rules out the limitation I have mentioned before.</p>
