Reputation: 537
I'm trying to configure an Ingress resource in an EKS cluster running v1.18 using the below configuration. after running kubectl apply -f blah.yaml
I'm returned error: unable to recognize "blah.yaml": no matches for kind "Ingress" inversion "networking.k8s.io/v1"
I think it's an apiversion mismatch. What am I missing?
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: foo
spec:
rules:
- http:
paths:
- path: /boom
pathType: Prefix
backend:
service:
name: foo
port:
number: 80
Upvotes: 0
Views: 297
Reputation: 349
You can check what is the apiVersions are present for networking.k8s.io
resource in your system using
kubectl api-versions | grep networking.k8s.io
Check if you have networking.k8s.io/v1
in the output.
Upvotes: 1
Reputation: 537
It was a version problem the below works.
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: foo
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /boom
backend:
serviceName: foo
servicePort: 80
Upvotes: 1