<p>I have a cluster in GKE and it is working, everything seems to be working. If I forward the ports I am able to see that the containers are working.</p>
<p>I am not able to setup a domain I own from namecheap.</p>
<p>These are the steps I followed</p>
<ol>
<li>In Namecheap I setup a custom dns for the domain</li>
</ol>
<pre><code>ns-cloud-c1.googledomains.com.
ns-cloud-c2.googledomains.com.
ns-cloud-c3.googledomains.com.
ns-cloud-c3.googledomains.com.
</code></pre>
<p>I used the letter <code>c</code> because the cluster is in a <code>c</code> zone (I am not sure if this is right)</p>
<ol start="2">
<li>Because I am trying to setup as secure website I installed nginx ingress controller</li>
</ol>
<pre><code>kubectl create clusterrolebinding cluster-admin-binding \
  --clusterrole cluster-admin \
  --user $(gcloud config get-value account)
</code></pre>
<p>and</p>
<pre><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.46.0/deploy/static/provider/cloud/deploy.yaml
</code></pre>
<ol start="3">
<li>I applied the <code>issuer.yml</code></li>
</ol>
<pre><code>apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
 name: letsencrypt-prod
 namespace: cert-manager
spec:
 acme:
   # The ACME server URL
   server: https://acme-v02.api.letsencrypt.org/directory
   # Email address used for ACME registration
   email: example@email.com
   # Name of a secret used to store the ACME account private key
   privateKeySecretRef:
     name: letsencrypt-prod
   # Enable the HTTP-01 challenge provider
   solvers:
   - http01:
       ingress:
         class:  nginx
</code></pre>
<ol start="4">
<li>I applied ingress</li>
</ol>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  namespace: staging
  name: ingress
  annotations:
    cert-manager.io/cluster-issuer: &quot;letsencrypt-prod&quot;
spec:
  tls:
    - hosts:
      - www.stagingmyappsrl.com
      - api.stagingmyappsrl.com
      secretName: stagingmyappsrl-tls
  rules:
  - host: wwwstaging.myappsrl.com
    http:
      paths:
      - backend:
          serviceName: myappcatalogo-svc
          servicePort: 80

  - host: apistaging.stagingmyappsrl.com
    http:
      paths:
      - backend:
          serviceName: myappnodeapi-svc
          servicePort: 80
</code></pre>
<p>It seems that everything is created and working if I check in GKE website, but when I try to access I get <code>DNS_PROBE_FINISHED_NXDOMAIN</code></p>
<p>I am not sure if I am missing an step or if I am setting up something wrong</p>

<p>GKE should have created a cloud load balancer for your ingress service. Depending on your config, the LB can be internal or external. You can get your LB information by looking at the services:</p>
<pre><code>kubectl get svc -n ingress-nginx
</code></pre>
<p>Create a CNAME record in your DNS (namecheap) with the LB address and that should do it. Alternatively, if you have an IP address of the LB, create an A record in your DNS.</p>
<p>Cert-manager will create an ingress resource to resolve <code>HTTPS01</code> challenges. Make sure your ingresses are reachable over the Internet for the <code>HTTPS01</code> challenges to work. Alternatively, you could explore other solvers.</p>
