k8s schema validation error: could not find schema for Ingress #141
-
Hi, Yaml file: # Kibana HTTP Port
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: kibana
namespace: core-services
spec:
rules:
- http:
paths:
- path: /kibana
pathType: Prefix
backend:
service:
name: kibana
port:
number: 5601 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @rekibnikufesin, Here's some info on how you can change the default schema version for datree: https://hub.datree.io/schema-validation Alternatively, you can change your yaml file to match k8s 1.18 version. Should look like this:
|
Beta Was this translation helpful? Give feedback.
Hi @rekibnikufesin,
My guess is that you are trying to run an ingress yaml on the wrong k8s version schema validator.
Datree sets the default version to
1.18
, and it looks like this ingress file is matching versions 1.19 and above.You can try and run
datree test --schema-version 1.19.0 <file>
.Here's some info on how you can change the default schema version for datree: https://hub.datree.io/schema-validation
Alternatively, you can change your yaml file to match k8s 1.18 version. Should look like this: