Troubleshooting VirtualServer resources
This page describes how to troubleshoot VirtualServer and VirtualServerRoute resource events.
After creating or updating a VirtualServer resource, you can immediately check if the NGINX configuration for that resource was successful by using kubectl describe vs <resource-name>:
kubectl describe vs cafeEvents:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal AddedOrUpdated 16s nginx-ingress-controller Configuration for default/cafe was added or updatedIn the above example, we have a Normal event with the AddedOrUpdate reason, which informs us that the configuration was successfully applied.
Checking the events of a VirtualServerRoute is similar:
kubectl describe vsr coffeeEvents:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal AddedOrUpdated 1m nginx-ingress-controller Configuration for default/coffee was added or updatedIf a VirtualServerRoute defines a spec.host that doesn’t match the referencing VirtualServer, NGINX Ingress Controller rejects the route attachment and logs a warning event on the resource.
To resolve a host mismatch:
- Update
spec.hostin the VirtualServerRoute to match the VirtualServerhostexactly. - Omit
spec.hostfrom the VirtualServerRoute (hostless mode) so any VirtualServer can reference it.