<p>I am taking a helm chart class and the 1st lab creates a pod, service and ingress.  I am relatively new to k8s and I am running on minikube.  The pod and service get created without issue; however the ingress.yaml file gives the following error:</p>
<p><strong>unable to recognize &quot;ingress.yaml&quot;: no matches for kind &quot;Ingress&quot; in version &quot;extensions/v1beta1</strong></p>
<p>I am guessing something is obsolete in the ingress.yaml file but have no idea how to fix it.  here's the class repo:</p>
<pre><code>https://github.com/phcollignon/helm3
</code></pre>
<p>here's the pod frontend.yaml :</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend
spec:
  replicas: 1
  selector:
    matchLabels:
      app: frontend 
  template:
    metadata:
      labels:
        app: frontend
    spec:
      containers:
      - image: phico/frontend:1.0
        imagePullPolicy: Always
        name: frontend
        ports:
        - name: frontend
          containerPort: 4200
</code></pre>
<p>here's the frontend_service.yaml :</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  labels:
    name: frontend
  name: frontend
spec:
  ports:
    - protocol: &quot;TCP&quot;
      port: 80
      targetPort: 4200
  selector:
    app: frontend
</code></pre>
<p>Here's the problem file ingress.yaml :</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: guestbook-ingress
spec:
  rules:
  - host: frontend.minikube.local
    http:
      paths:
      - path: /
        backend:
          serviceName: frontend
          servicePort: 80
  - host: backend.minikube.local
    http:
      paths:
      - path: /
        backend:
          serviceName: backend
          servicePort: 80%        
</code></pre>
<p>Here's minikube version (kubectrl version) :</p>
<pre><code>Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;22&quot;, GitVersion:&quot;v1.22.5&quot;, GitCommit:&quot;5c99e2ac2ff9a3c549d9ca665e7bc05a3e18f07e&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2021-12-16T08:38:33Z&quot;, GoVersion:&quot;go1.16.12&quot;, Compiler:&quot;gc&quot;, Platform:&quot;darwin/amd64&quot;}
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;23&quot;, GitVersion:&quot;v1.23.1&quot;, GitCommit:&quot;86ec240af8cbd1b60bcc4c03c20da9b98005b92e&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2021-12-16T11:34:54Z&quot;, GoVersion:&quot;go1.17.5&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
</code></pre>
<p>Any help is very much appreciated.</p>
<p>I changed the ingress.yaml file to use
<code>apiVersion: networking.k8s.io/v1:</code></p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: guestbook-ingress
spec:
  rules:
  - host: frontend.minikube.local
    http:
      paths:
      - path: /
        backend:
          service:
            name: frontend
            port:
              number: 80
  - host: backend.minikube.local
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: backend
            port:
              number: 80
</code></pre>
<p>now I am getting an error:</p>
<p><strong>error: error parsing ingress.yaml: error converting YAML to JSON: yaml: line 17: mapping values are not allowed in this context</strong></p>
<p>line 17 is the second &quot;paths:&quot; line.</p>
<p>Again, any help appreciated.</p>

user15223679
<p>Ingress spec <code>apiVersion: extensions/v1beta1</code> has deprecated. You can update it to <code>apiVersion: networking.k8s.io/v1</code></p>
<p>Second question:</p>
<pre><code>kind: Ingress
metadata:
  name: guestbook-ingress
spec:
  rules:
  - host: frontend.minikube.local
    http:
      paths:
      - path: /
        pathType: Prefix  
        backend:
          service:
            name: frontend
            port:
              number: 80
  - host: backend.minikube.local
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: backend
            port:
              number: 80
</code></pre>
