Dave McLean:
Is anyone able to help explain why this yaml:
apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: Ingress
metadata:
name: ingress
annotations:
<http://nginx.ingress.kubernetes.io/rewrite-target|nginx.ingress.kubernetes.io/rewrite-target>: /
spec:
rules:
- http:
paths: <--- 4 paces here?!
- path: /wear
pathType: Prefix
backend:
service:
name: video-service
port:
number: 8080
is valid.
but this yaml:
apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: Ingress
metadata:
name: ingress
annotations:
<http://nginx.ingress.kubernetes.io/rewrite-target|nginx.ingress.kubernetes.io/rewrite-target>: /
spec:
rules:
- http:
paths: <--- 2 paces here?!
- path: /wear
pathType: Prefix
backend:
service:
name: video-service
port:
number: 8080
is not?
This only difference is that in the first “paths” and everything under it is double indented.
The failure is:
error validating data: ValidationError(Ingress.spec.rules[0]): unknown field “paths” in io.k8s.api.networking.v1.IngressRule;