<p>I deploy a kubernetes cluster on Ubuntu following the steps described at <a href="https://computingforgeeks.com/deploy-kubernetes-cluster-on-ubuntu-with-kubeadm/" rel="nofollow noreferrer">this link</a></p>
<p>Then I deploy a Wordpress following steps found at <a href="https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/" rel="nofollow noreferrer">here</a></p>
<p>Everything works fine but I miss what I should do to serve the wp instance at a specific hostname like <code>http://wp.example.com</code> instead of <code>http://[kubeip]:port</code></p>
<p>I'd like to have several different WP instances which respond to specific url.
I tried to have a look at Ingress but I did not find nothing clear and I don't know if it's the right choice.</p>
<p>Can someone suggest me something?
Thanks</p>

Luca Cerretani
<p>TY. I follow the guide to add the nginx-ingress-controller in a bare-metal at <a href="https://kubernetes.github.io/ingress-nginx/deploy/#provider-specific-steps" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/deploy/#provider-specific-steps</a></p>
<p>Then I tried to use a ingress.yaml like this</p>
<pre>
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
    name: wordpress-ingress
    annotations:
        nginx.ingress.kubernetes.io/rewrite-target: /
spec:
    defaultBackend:
        service:
            name: wordpress
            port:
                number: 80
    rules:
      - host: wp.example.com
        http:
            paths:
              - path: /
                pathType: Prefix
                backend:
                    service:
                        name: wordpress
                        port:
                            number: 80
</pre>
<p>But it doesn't work as expected</p>
