<p>So, I'm using minikube v1.19.0 in ubuntu and using nginx-ingress with kubernetes. I have two node files: auth and client having docker image made respectively</p>
<p>i got 4 kubernetes cinfig files which are as follows:</p>
<p>auth-deply.yaml:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: auth-depl
spec:
  replicas: 1
  selector:
    matchLabels:
      app: auth
  template:
    metadata:
      labels:
        app: auth
    spec:
      containers:
        - name: auth
          image: xyz/auth
          env:
            - name: JWT_KEY
              valueFrom:
                secretKeyRef:
                  name: jwt-secret
                  key: JWT_KEY
---
apiVersion: v1
kind: Service
metadata:
  name: auth-srv
spec:
  selector:
    app: auth
  ports:
    - name: auth
      protocol: TCP
      port: 3000
      targetPort: 3000

</code></pre>
<p>auth-moongo-depl.yaml:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: auth-mongo-depl
spec:
  selector:
    matchLabels:
      app: auth-mongo
  template:
    metadata:
      labels:
        app: auth-mongo
    spec:
      containers:
      - name: auth-mongo
        image: mongo
---
apiVersion: v1
kind: Service
metadata:
  name: auth-mongo-srv
spec:
  selector:
    app: auth-mongo
  ports:
    - name: db
      protocol: TCP
      port: 27017
      targetPort: 27017
</code></pre>
<p>client-depl.yaml:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: client-depl
spec:
  replicas: 1
  selector:
    matchLabels:
      app: client
  template:
    metadata:
      labels:
        app: client
    spec:
      containers:
        - name: client
          image: xyz/client
---
apiVersion: v1
kind: Service
metadata:
  name: client-srv
spec:
  selector:
    app: client
  ports:
    - name: client
      protocol: TCP
      port: 3000
      targetPort: 3000
</code></pre>
<p>ingress-srv.yaml:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress-service
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/use-regex: 'true'
spec:
  rules:
    - host: ticketing.dev
      http:
        paths:
          - path: /api/users/?(.*)
            backend:
              serviceName: auth-srv
              servicePort: 3000
          - path: /?(.*)
            backend:
              serviceName: client-srv
              servicePort: 3000

</code></pre>
<p>skaffold.yaml:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: skaffold/v2alpha3
kind: Config
deploy:
  kubectl:
    manifests:
      - ./infra/k8s/*
build:
  local:
    push: false
  artifacts:
    - image: xyz/auth
      context: auth
      docker:
        dockerfile: Dockerfile
      sync:
        manual:
          - src: 'src/**/*.ts'
            dest: .
    - image: xyz/client
      context: client
      docker:
        dockerfile: Dockerfile
      sync:
        manual:
          - src: '**/*.js'
            dest: .
</code></pre>
<p>Now, when I run <code>skaffold dev</code> the following error is coming:</p>
<pre class="lang-sh prettyprint-override"><code>Listing files to watch...
 - xyz/auth
 - xyz/client
Generating tags...
 - xyz/auth -&gt; xyz/auth:abcb6e4
 - xyz/client -&gt; xyz/client:abcb6e4
Checking cache...
 - xyz/auth: Found Locally
 - xyz/client: Found Locally
Starting test...
Tags used in deployment:
 - xyz/auth -&gt; xyz/auth:370487d5c0136906178e602b3548ddba9db75106b22a1af238e02ed950ec3f21
 - xyz/client -&gt; xyz/client:a56ea90769d6f31e983a42e1c52275b8ea2480cb8905bf19b08738e0c34eafd3
Starting deploy...
 - deployment.apps/auth-depl configured
 - service/auth-srv configured
 - deployment.apps/auth-mongo-depl configured
 - service/auth-mongo-srv configured
 - deployment.apps/client-depl configured
 - service/client-srv configured
 - Warning: extensions/v1beta1 Ingress is deprecated in v1.14+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress
 - Error from server (InternalError): error when creating &quot;STDIN&quot;: Internal error occurred: failed calling webhook &quot;validate.nginx.ingress.kubernetes.io&quot;: an error on the server (&quot;&quot;) has prevented the request from succeeding
exiting dev mode because first deploy failed: kubectl apply: exit status 1

</code></pre>
<p>Actually everything was working fine until i reinstall minikube again and getting this problem.
Need some help here.</p>

Ishan Joshi
<p>Actually I just found out the issue was when reinstalling the minikube, Validating Webhook was not deleted and creating the issue hence, should be removed using following command.</p>
<pre class="lang-sh prettyprint-override"><code>kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission
</code></pre>
<p>I found out that while reinstalling i forgot to remove this webhook that is installed in the manifests which created this problem.</p>
<p>Additional links related to this problem:</p>
<p><a href="https://stackoverflow.com/questions/61365202/nginx-ingress-service-ingress-nginx-controller-admission-not-found/62044090#62044090">Nginx Ingress: service &quot;ingress-nginx-controller-admission&quot; not found</a></p>
<p><a href="https://stackoverflow.com/questions/61616203/nginx-ingress-controller-failed-calling-webhook">Nginx Ingress Controller - Failed Calling Webhook</a></p>
