F5 controller resources and policies
Choose the appropriate resource family
F5 supports standard Ingress plus custom resources. VirtualServer describes an HTTP virtual host with upstreams and routes. VirtualServerRoute delegates route configuration to a separate resource, useful for dividing ownership between teams. TransportServer represents stream traffic rather than HTTP path selection; TCP and UDP listeners need matching GlobalConfiguration entries, while TLS passthrough uses its own supported listener configuration. Policy expresses reusable controls. Custom resources require installed CRDs, the appropriate controller flags, compatible Kubernetes versions and permissions. Do not assume NGINX Plus-only features are available in OSS.
Ingress: portable HTTP routing core + controller extensionsVirtualServer / VirtualServerRoute: F5 HTTP resourcesTransportServer: TCP/UDP or TLS passthroughPolicy: reusable controlsTranslate the route into a VirtualServer
This candidate is an alternative to the Ingress in lesson one, not a second object to deploy for the same host. The upstream name is local to the VirtualServer; its service and port refer to the Kubernetes Service. The pass action selects that named upstream. TLS references a same-namespace Secret. The route path is evaluated according to the F5 resource semantics; test boundaries such as /catalogue before asserting parity with Kubernetes Prefix. A host collision can reject resources or change ownership. Keep explicit ingressClassName even for custom resources: documented F5 flags may allow classless custom objects to be processed by multiple controllers.
apiVersion: k8s.nginx.org/v1kind: VirtualServermetadata: name: catalog namespace: bm-nginx50spec: ingressClassName: bm-f5 host: catalog.example.test tls: secret: catalog-tls upstreams: - name: catalog-backend service: catalog port: 80 read-timeout: 30s routes: - path: /catalog action: pass: catalog-backendDelegate without losing ownership
A VirtualServer can point a route to a VirtualServerRoute. The child defines subroutes and upstreams under the parent host and path constraints. Separate teams can own subroutes while platform operators retain listener and TLS control. Cross-namespace delegation needs explicit permissions, controller watch scope and verified reference syntax. A TransportServer has different listener and host collision rules. The partial outline below deliberately omits required resource fields; it is for reading, not application. Check the installed CRD and controller documentation before turning it into a manifest.
# Partial VirtualServer route, and separate VirtualServerRoute spec# Parent route:path: /catalogroute: catalog-routes# Child spec (separate resource):# host: catalog.example.test# ingressClassName: bm-f5# upstreams: define catalog-backend here# subroutes: define /catalog and action.pass hereAttach a policy and verify rejection
The illustrative Policy allows a documentation-only client network. It is not a real cluster CIDR and must not be applied to a live environment. Attach it by name in a VirtualServer spec.policies list or supported route policies; standard Ingress support through nginx.org/policies is version-dependent (introduced in 5.4.0 according to current F5 docs). For accessControl choose allow or deny, not both in a single policy. Route-level policies may override server-level controls, so review effective permissions. API schema acceptance differs from controller validation: an invalid referenced Policy can cause HTTP 500 on affected routes. Inspect events and verify intended allow/deny outcomes using trusted source identity; never trust arbitrary client forwarding headers.
apiVersion: k8s.nginx.org/v1kind: Policymetadata: name: catalog-access namespace: bm-nginx50spec: accessControl: allow: - 192.0.2.0/24Practice and verification
Practice: Compare virtualserver.yaml and ingress.yaml. Identify equivalent intent, unresolved path semantics, policy attachment and a TransportServer prerequisite. Explain why the two host objects are alternatives.
Expected reasoning: Both target catalog:80; verify route matching and host collision; attach the Policy by supported name and check effective access; TCP/UDP need a matching listener.
These examples are staged offline; exact controller release, CRD schemas, admission and runtime behavior are unverified.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
F5 controller resources and policies
Assess controller selection and migration decisions.
Which resource models HTTP upstreams and routes?
Which resource delegates HTTP subroutes?
What must a TCP TransportServer reference?
How should an accessControl policy combine allow and deny?
What should be checked when a Policy is rejected?