title: how to convert all kubernetes ingress yamls to use API version networking.k8s.io/v1
body: <p>Kubernetes Ingress API version <code>networking.k8s.io/v1</code> has lot of changes in fields wrt extensions/v1beta1 like the following:</p>
  <pre><code>* `spec.backend` -&gt; `spec.defaultBackend`
  * `serviceName` -&gt; `service.name`
  * `servicePort` -&gt; `service.port.name` (for string values)
  * `servicePort` -&gt; `service.port.number` (for numeric values)
  * `pathType` no longer has a default value in v1; &quot;Exact&quot;, &quot;Prefix&quot;, or &quot;ImplementationSpecific&quot; must be specified
  </code></pre>
  <p>What is the easiest way to convert all ingress yaml files from extensions/v1beta1 to networking.k8s.io/v1.</p>
  <p>Looks like kubectl convert is already deprecated in v1.19.</p>
  <p>Kubernetes version:</p>
  <pre><code>kubectl version
  Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;19&quot;, GitVersion:&quot;v1.19.0&quot;, GitCommit:&quot;e19964183377d0ec2052d1f1fa930c4d7575bd50&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2020-08-26T14:30:33Z&quot;, GoVersion:&quot;go1.15&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
  Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;19&quot;, GitVersion:&quot;v1.19.0&quot;, GitCommit:&quot;e19964183377d0ec2052d1f1fa930c4d7575bd50&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2020-08-26T14:23:04Z&quot;, GoVersion:&quot;go1.15&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
  </code></pre>
  <p>Error while using kubectl convert:</p>
  <pre><code>kubectl convert -f ingress_4_10_1.yaml --output-version  networking.k8s.io/v1
  kubectl convert is DEPRECATED and will be removed in a future version.
  In order to convert, kubectl apply the object to the cluster, then kubectl get at the desired version.
  error: networking.Ingress is not suitable for converting to &quot;networking.k8s.io/v1&quot; in scheme &quot;k8s.io/kubernetes/pkg/api/legacyscheme/scheme.go:30&quot;
  </code></pre>
  <p>My ingress yaml:</p>
  <pre><code>apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    name: frontend
    annotations:
     kubernetes.io/ingress.class: &quot;ing-class1&quot;
  spec:
    rules:
    - host:  frontend.com
      http:
        paths:
        - path: /web-frontend/frontend.php
          backend:
            serviceName: frontend
            servicePort: 80
  </code></pre>