<p>I am on Kubernetes v1.22.13. When i was trying to delete a namespace that's stuck in status <code>terminating</code>, i deleted api-service <code>v1.networking.k8s.io</code> by mistake with:</p>
<pre><code>kubectl delete apiservices.apiregistration.k8s.io v1.networking.k8s.io
</code></pre>
<p>And now i don't have crds related to <code>v1.networking.k8s.io</code> such as <code>Ingress</code>.  When i try to install ingress-controller it gives the error:</p>
<blockquote>
<p>error: resource mapping not found for name: &quot;nginx&quot; namespace: &quot;&quot; from &quot;https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.4.0/deploy/static/provider/cloud/deploy.yaml&quot;: no matches for kind &quot;IngressClass&quot; in version &quot;networking.k8s.io/v1&quot;</p>
</blockquote>
<p>How can i undo that operation? Or how can i bring back api-resource <code>v1.networking.k8s.io</code>?</p>
<p>Tried to find a way to undo it and install it manually but i couldn't find the manifest related to that.</p>

<p>You can recreate it via the following:</p>
<pre><code>cat &lt;&lt;EOF | kubectl apply -f -
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
  labels:
    kube-aggregator.kubernetes.io/automanaged: onstart
  name: v1.networking.k8s.io
spec:
  group: networking.k8s.io
  groupPriorityMinimum: 17200
  version: v1
  versionPriority: 15
EOF
</code></pre>
