Creating an Ingress resource fails with validation error in OpenShift 4
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4
- Kubernetes
Ingress
resource (ingress.networking.k8s.io
)
Issue
-
Trying to create a Kubernetes
Ingress
resource (ingress.networking.k8s.io
) fails with error in theIngress
events
:Warning FailedDeployModel 2m (x4 over 1m) ingress Failed deploy model due to InvalidParameter: 1 validation error(s) found.
-
The following error messages are shown in the
events
for thenamespace
where theIngress
is failing:Warning FailedDeployModel ingress/[ingress_name] Failed deploy model due to failed to create listener rule: ValidationError: Condition value 'xxxxxxxx' contains a character that is not valid...
Resolution
It is needed to review the failing rule
in the Ingress
resource. If there are lots of rules and there are several ones failing, or it is not possible to identify the one that is failing, try to create a more simple Ingress
resource and start adding the rules
one by one.
Check the events
for the Ingress
resource and also the events
for the full namespace
for troubleshooting the error. Refer to the "Diagnostic Steps" section for additional information.
Root Cause
One or more rules
from the Ingress
resource are failing, and it is needed to identify and fix them.
Diagnostic Steps
Check the events of the Ingress
resource:
$ oc describe ingress [ingress_name] -n [ingress_namespace_name]
[...]
Events:
Warning FailedDeployModel 2m (x4 over 1m) ingress Failed deploy model due to InvalidParameter: 1 validation error(s) found.
- minimum field value of 1, CreateTargetGroupInput.Port.
Check the events of the namespace where the Ingress
resource is failing:
$ oc get events -n [namespace_name] --sort-by='.lastTimestamp'
[...]
NAMESPACE LAST SEEN TYPE REASON OBJECT MESSAGE
[namespace_name] 10m Warning FailedDeployModel ingress/[ingress_name] Failed deploy model due to InvalidParameter: 1 validation error(s) found....
[namespace_name] 10m Warning FailedDeployModel ingress/[ingress_name] Failed deploy model due to InvalidParameter: 1 validation error(s) found....
[namespace_name] 10m Warning FailedDeployModel ingress/[ingress_name] Failed deploy model due to failed to create listener rule: ValidationError: Condition value 'xxxxxxxx' contains a character that is not valid...
[namespace_name] 10m Warning FailedDeployModel ingress[ingress_name] (combined from similar events): Failed deploy model due to failed to create listener rule: ValidationError: Condition value 'xxxxxxxx' contains a character that is not valid...
[...]
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments