An F5 BIG-IP edge for a Kubernetes inference API: BGP, Advanced WAF and CIS (part 2 of 3)

Part 2 of 3. An F5 BIG-IP in front of a Kubernetes inference API: BGP route health timed under failure, an Advanced WAF built from the OpenAPI contract with a narrow fix for a prompt that quotes SQL, and three settings that looked correct and weren't.
F5 BIG-IP in front of an inference API

On this page

This is part 2 of a three-part series on a two-site edge for an AI inference API: part 1, a second pod network with Multus on the EVPN VXLAN fabric; part 2, the F5 BIG-IP edge: BGP route health, Advanced WAF and CIS; part 3, failover between the two sites with BIG-IP DNS.

An inference API that faces the internet needs four things at the edge: TLS, a WAF that understands the API, a route that's withdrawn when the service is unhealthy, and a load-balancing pool that tracks pods. This part builds all four on an F5 BIG-IP and tests each one under failure.

This part builds that edge in front of llama.cpp and then fails it. The outputs come from one recorded run plus short addenda against the same lab. Three settings looked correct and weren't: one failed a test, and two showed up on inspection.

The lab

The site is the one from part 1: an EVPN VXLAN fabric on Enterprise SONiC, a kubeadm cluster with Cilium, and two llama.cpp replicas serving a small model through an OpenAI-compatible API. In front of it sit a BIG-IP 17.5.1 and an edge router, which peers eBGP with the BIG-IP and with an internet core. F5 Container Ingress Services (CIS) 2.20.4.1 runs in the cluster and drives the BIG-IP through AS3 3.56.

Diagram: client, core router, site edge router, BIG-IP with the VIP, TLS, WAF and monitors, the EVPN leaf pair, two llama.cpp pods, and the CIS controller talking to the BIG-IP management API.
One site's edge. The internet sees the site's /24; the edge learns the VIP's /32 from the BIG-IP while the VIP is available.

What the run shows

  • The BIG-IP advertises the VIP by BGP and withdraws it when the backends fail. The monitors timed out 16 seconds after the break, and the route was first seen gone from the edge at 40 seconds.
  • CIS builds the virtual server from a Kubernetes resource, with pod IPs as pool members and one static route per node.
  • The pool monitors send a one-token completion as well as a health check.
  • An Advanced WAF policy generated from the API's OpenAPI contract blocks a wrong method, an unknown URL, an extra JSON field and a request with too many messages.
  • A legitimate prompt that quotes SQL trips two signatures. Those two are disabled on the prompt field only, and an XSS payload in the same field is still blocked.
  • Three settings looked correct and weren't. A host-based virtual server kept its route advertised with no pods. Monitor strings lost their quotes, and the pool needs only one of its two monitors to pass.

This post is for paying subscribers only

Subscribe to LevelUp I.T. newsletter and stay updated.

Don't miss anything. Get all the latest posts delivered straight to your inbox. It's free!
Great! Check your inbox and click the link to confirm your subscription.
Error! Please enter a valid email address!