Ingresses expose Kubernetes applications externally to the public. Ingresses associate with Pods through references to Services. This validator detects a condition when Ingresses are pointing to non-existing Port of the Service.
Affected Resources: Ingress
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-ingress
spec:
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: foo-service
port:
number: 80 # Port 80 not present in the Service
apiVersion: v1
kind: Service
metadata:
name: foo-service
spec:
ports:
- port: 9000 # Different port used in Ingress
protocol: TCP
targetPort: http
...
Please let us know if there are other built-in validation rules you would like to see in Kubevious to detect misconfigurations and violations to best practices. Optionally, you can provide your details so we can reach out to you with follow-up questions.