Building a Microservices app(Node/React) with docker and kubernetes and I keep getting the following error when I run the skaffold dev
command.
- stderr: "error: unable to recognize ~/infra/k8s/ingress-srv.yaml": no matches for kind "Ingress" in version "extensions/v1beta1"n"
This is my ingress-srv.yaml file:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress-serv
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
rules:
- host: ticketing.dev
http:
paths:
- pathType: Prefix
- path: "/api/users/?(.*)"
backend:
service:
name: auth-srv
port:
number: 3000
And this is my skaffold.yaml file
apiVersion: skaffold/v2alpha3
kind: Config
deploy:
kubectl:
manifests:
- ./infra/k8s/*
build:
local:
push: false
artifacts:
- image: mutuadocker/auth
context: auth
docker:
dockerfile: Dockerfile
sync:
manual:
- src: "src/**/*.ts"
dest: .
2
Answers
You should change
apiVersion: extensions/v1beta1
toapiVersion: networking.k8s.io/v1
so your file would look like this:
Refer to this documentation.
I know this question is partly old but…
Here’s my answer.
Make sure the pathType is inside the paths array; not outside it and not as a standalone array