<p>I want to redirect two namecheap domains <code>testA.com</code> and <code>testB.com</code> to two different services (websites) on my raspberry pi cluster.</p>
<p>I set everything up using an updated form from <a href="https://www.puzzle.ch/de/blog/articles/2020/10/13/k3s-on-raspberry-pi" rel="nofollow noreferrer">this guide</a>. This means that k3s, metalb, nginx ingress and cert-manager are fully deployed and working.</p>
<pre><code>% kubectl get pods --all-namespaces
NAMESPACE      NAME                                                      READY   STATUS    RESTARTS   AGE
kube-system    metallb-speaker-bsxfg                                     1/1     Running   1          30h
kube-system    metallb-speaker-6pwsb                                     1/1     Running   1          30h
kube-system    nginx-ingress-ingress-nginx-controller-7cc994599f-db285   1/1     Running   1          28h
cert-manager   cert-manager-7998c69865-754mr                             1/1     Running   2          27h
kube-system    metallb-speaker-z8p97                                     1/1     Running   1          30h
webserver      httpd-554794f9fd-npd4g                                    1/1     Running   1          21h
kube-system    metallb-controller-df647b67b-2khlr                        1/1     Running   1          30h
kube-system    coredns-854c77959c-dl74f                                  1/1     Running   2          33h
cert-manager   cert-manager-webhook-7d6d4c78bc-97g2g                     1/1     Running   1          27h
kube-system    metrics-server-86cbb8457f-2vqmt                           1/1     Running   3          33h
cert-manager   cert-manager-cainjector-7b744d56fb-bvwjd                  1/1     Running   2          27h
kube-system    local-path-provisioner-5ff76fc89d-vbqs9                   1/1     Running   4          33h
</code></pre>
<pre><code>% kubectl get services  -n kube-system -o wide                     
NAME                                               TYPE           CLUSTER-IP      EXTERNAL-IP       PORT(S)                      AGE   SELECTOR
nginx-ingress-ingress-nginx-controller-admission   ClusterIP      10.43.116.250   &lt;none&gt;            443/TCP                      28h   app.kubernetes.io/component=controller,app.kubernetes.io/instance=nginx-ingress,app.kubernetes.io/name=ingress-nginx
nginx-ingress-ingress-nginx-controller             LoadBalancer   10.43.10.136    192.168.178.240   80:31517/TCP,443:31733/TCP   28h   app.kubernetes.io/component=controller,app.kubernetes.io/instance=nginx-ingress,app.kubernetes.io/name=ingress-nginx
</code></pre>
<p>The guide describes it for dynDNS. How should I do this if I had two domains and two different websites. Is this done with a containerised certbot? Or do I need CNAME?</p>

A.Dumas
<p>You can run the command and check for the <strong>LoadBalancer IP</strong> which is external or exposed to internet IP.</p>
<p>you can this IP to DNS side as <strong>A</strong> record or <strong>CNAME</strong> record and you are done. Your both domain will be pointing the traffic to the Kubernetes cluster and inside the Kubernetes, you can create the ingress routes or record to divert the traffic to a specific service.</p>
