Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 >}}
Comment thread
promptless[bot] marked this conversation as resolved.

## 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" >}}).
Expand Down
31 changes: 31 additions & 0 deletions content/nic/troubleshooting/troubleshoot-virtualserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Comment thread
promptless[bot] marked this conversation as resolved.

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
Comment thread
promptless[bot] marked this conversation as resolved.
```

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`.
Loading