<p>I am running k3s version 1.25.5 and I would like to define traefik as an ingress for one of the services defined through <a href="https://helm.camunda.io/" rel="nofollow noreferrer">an external helm chart</a>. I am struggling to find the right ingress definition. I tried with the below yaml file but that gives an error stating</p>
<pre><code>error: resource mapping not found for name: &quot;c8-ingress&quot; namespace: &quot;&quot; from &quot;zeebe-traefik.yaml&quot;: no matches for kind &quot;Ingress&quot; in version &quot;extensions/v1beta1&quot;
ensure CRDs are installed first
</code></pre>
<p>This seems to be because of the an old apiVersion used in the yaml file. How to do it the right way?</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: c8-ingress
  annotations:
    kubernetes.io/ingress.class: &quot;traefik&quot;
spec:
  rules:
  - http:
      paths:
      - path: &quot;/&quot;
        backend:
          serviceName: dev-zeebe-gateway
          servicePort: 26500
</code></pre>
<p>Thanks.</p>

Andy Dufresne
<p>Your example is using an outdated Ingress definition. In v1.25.x you need to use the stable <code>networking.k8s.io/v1</code> API, as described <a href="https://v1-25.docs.kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">here</a>.</p>
<p>It is also recommended to provide the fitting namespace. This is useful for documentation, but also required for <a href="https://v1-25.docs.kubernetes.io/docs/concepts/services-networking/ingress/#resource-backend" rel="nofollow noreferrer">resource backends</a>. It will also avoid adding <code>-n YOURNAMESPACE</code> to every <code>kubectl apply</code>.</p>
<p>In your case, this may look something like:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: c8-ingress
  namespace: YOURNAMESPACE
spec:
  rules:
    - http:
        paths:
          - pathType: Prefix
            path: /
            backend:
              service:
                name: dev-zeebe-gateway
                port:
                  number: 26500
</code></pre>
<p>I hope this helps to solve your issue.</p>
<p>In many cases, you can run <code>kubectl explain RESOURCE</code> to get useful links and resources for a given api-resource.</p>
