From 1d842ac76fc75f06a8fdffff639f8b4b1ea58a65 Mon Sep 17 00:00:00 2001 From: "promptless[bot]" Date: Sat, 19 Sep 2026 21:47:24 +0000 Subject: [PATCH] docs: Document routeSelector no-match warning for NIC Document that F5 NGINX Ingress Controller now emits a Warning event and sets a VirtualServer to State: Warning when its routeSelector matches no VirtualServerRoutes, instead of staying Valid with no event. Add a "Warning events" section to the VirtualServer troubleshooting page with the kubectl describe output, the conditions that cause the warning, and how to clear it. Add a cross-linked note in the routeSelector reference section. Documents nginx/kubernetes-ingress#10913. --- ...server-and-virtualserverroute-resources.md | 2 ++ .../troubleshoot-virtualserver.md | 31 +++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/content/nic/configuration/virtualserver-and-virtualserverroute-resources.md b/content/nic/configuration/virtualserver-and-virtualserverroute-resources.md index 3b20c29f8..2c18c94ad 100644 --- a/content/nic/configuration/virtualserver-and-virtualserverroute-resources.md +++ b/content/nic/configuration/virtualserver-and-virtualserverroute-resources.md @@ -231,6 +231,8 @@ See the [VirtualServerRoute specification](#virtualserverroute-specification) se |``matchLabels`` | A map of key-value pairs. Each key-value pair in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. | ``map[string]string`` | Yes | |``matchExpressions`` | A list of label selector requirements. The requirements are ANDed. For more information on label selector requirements, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set-based-requirements). | N/A | No | +{{< call-out class="note" >}} If a `routeSelector` matches no VirtualServerRoutes, the VirtualServer reports `State: Warning` and NGINX Ingress Controller emits a `Warning` event. For details, see [Warning events]({{< ref "/nic/troubleshooting/troubleshoot-virtualserver.md#warning-events" >}}). {{< /call-out >}} + ## VirtualServerRoute specification The VirtualServerRoute resource defines a route for a VirtualServer. It can consist of one or multiple subroutes. The VirtualServerRoute is an alternative to [Mergeable Ingress types]({{< ref "/nic/configuration/ingress-resources/cross-namespace-configuration.md" >}}). diff --git a/content/nic/troubleshooting/troubleshoot-virtualserver.md b/content/nic/troubleshooting/troubleshoot-virtualserver.md index 2c4ace18f..37a719d37 100644 --- a/content/nic/troubleshooting/troubleshoot-virtualserver.md +++ b/content/nic/troubleshooting/troubleshoot-virtualserver.md @@ -36,3 +36,34 @@ Events: ---- ------ ---- ---- ------- Normal AddedOrUpdated 1m nginx-ingress-controller Configuration for default/coffee was added or updated ``` + +### Warning events + +When a VirtualServer's `routeSelector` matches no VirtualServerRoutes, F5 NGINX Ingress Controller emits a `Warning` event, and the VirtualServer reports `State: Warning`. The warning shows that the VirtualServer serves no routes for the selected paths. Use this event to find a VirtualServer whose selector no longer matches any VirtualServerRoutes. + +A `routeSelector` matches no VirtualServerRoutes in these cases: + +- The selected VirtualServerRoutes are deleted. +- Their `ingressClassName` changes, so NGINX Ingress Controller no longer owns them. +- Their labels change, so they no longer match the selector. + +To see this event, describe the VirtualServer: + +```shell +kubectl describe vs cafe +``` + +```shell +Events: + Type Reason Age From Message + ---- ------ ---- ---- ------- + Warning AddedOrUpdatedWithWarning 16s nginx-ingress-controller Configuration for default/cafe was added or updated with warning(s): VirtualServerRoute routeSelector app=coffee matched no VirtualServerRoutes +``` + +To clear the warning, make sure at least one VirtualServerRoute matches the selector: + +- Recreate a deleted VirtualServerRoute. +- Restore its `ingressClassName`. +- Reapply the labels the selector requires. + +After you apply one of these fixes, `kubectl describe vs cafe` shows the `Normal` `AddedOrUpdated` event again. `State` returns to `Valid`.