title: Deploying Quarkus Apps with Kubernetes
body: <p>I'm trying to deploy an <a href="https://github.com/quarkusio/quarkus-quickstarts/tree/main/rest-json-quickstart" rel="nofollow noreferrer">example Quarkus app</a> with Kubernetes. Everything is fine when i run it in <code>dev</code> mode as <code>mvn quarkus:dev -Dquarkus.http.port=8080</code>. But when i deploy and go to the endpoint <code>localhost/rest-json</code> it says <code>RESTEASY003210: Could not find resource for full path: http://rest-json-http/</code>. i'm using <code>ingress-nginx</code>. What am i missing? Is there anything wrong with the k8s manifests?</p>
  <p>Here is my <code>application.yml</code>:</p>
  <pre class="lang-yaml prettyprint-override"><code>quarkus:
    http:
      cors:
        ~: true
      root-path: /rest-json
  </code></pre>
  <p><code>deployment.yml</code>:</p>
  <pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: rest-json
    namespace: default
    labels:
      app: rest-json
  spec:
    replicas: 1
    selector:
      matchLabels:
        app: rest-json
    template:
      metadata:
        labels:
          app: rest-json
      spec:
        containers:
          - name: rest-json
            image: quarkus/rest-json-jvm:latest
            imagePullPolicy: IfNotPresent
            ports:
              - containerPort: 8080
  </code></pre>
  <p><code>service.yml</code>:</p>
  <pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
  kind: Service
  metadata:
    name: rest-json-http
    namespace: default
  spec:
    ports:
      - protocol: TCP
        port: 8080
        targetPort: 8080
        name: http
    selector:
      app: rest-json
  </code></pre>
  <p><code>ingress.yml</code>:</p>
  <pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.k8s.io/v1
  kind: Ingress
  metadata:
    name: rest-json-ingress
    namespace: default
    annotations:
      nginx.ingress.kubernetes.io/rewrite-target: &quot;/&quot;
      nginx.ingress.kubernetes.io/upstream-vhost: &quot;rest-json-http&quot;
  spec:
    rules:
      - host: localhost
        http:
          paths:
            - path: /rest-json
              pathType: Prefix
              backend:
                service:
                  name: rest-json-http
                  port:
                    number: 8080
  </code></pre>
  <p>Here is repo to reproduce <a href="http://Here%20is%20repo%20to%20reproduce%20github.com/miador/rest-json-quickstart" rel="nofollow noreferrer">github.com/miador/rest-json-quickstart</a></p>