Configure pool health monitors

Health monitors check the availability of pool members attached to your virtual servers. When a pool member fails a health check, F5 BIG-IP Local Traffic Manager (LTM) on Cloud-Native Network Functions (CNF) removes it from the load balancing rotation until it recovers.

BIG-IP LTM on CNF supports the following pool monitor types:

  • TCP half-open — Verifies that a pool member accepts TCP connections without completing the full three-way handshake.

  • UDP — Sends a UDP datagram to a pool member and checks for an expected response.

  • HTTP — Sends an HTTP request and validates the response against expected content.

  • HTTPS — Sends an HTTP request over TLS and validates the response against expected content.

You configure monitors in the monitors section of the F5BigCnePool custom resource definition (CRD).

Before you begin

Before you configure health monitors, make sure you have:

  • A working BIG-IP LTM on CNF deployment.

  • At least one F5BigCnePool resource with pool members defined.

  • For HTTPS monitors: a server SSL profile configured and available in your namespace.

Configure a SIP monitor

A SIP monitor sends an OPTIONS request to each pool member and checks the response.

  1. Create or edit your pool YAML file:

    apiVersion: k8s.f5net.com/v1
    kind: F5BigCnePool
    metadata:
      name: sip-pool
      namespace: default
    spec:
      minActiveMembers: 1
      members:
        - address: 22.22.22.100
          port: 8046
          priorityGroup: 0
      monitors:
        sip:
          mode: mr-udp
          interval: 5
          upInterval: 10
          timeUntilUp: 0
          destination: "*:*"
          request: "OPTIONS sip:healthcheck@example.com SIP/2.0"
          headers: |
            Via: SIP/2.0/UDP 10.10.10.55:5060
            From: <sip:monitor@example.com>
            To: <sip:healthcheck@example.com>
            Call-ID: health-check-call-id
            CSeq: 1 OPTIONS
          debug: false
          manualResume: false
          filter: status
          filterNeg: none
    
  2. Apply the pool configuration:

    oc apply -f sip-pool.yaml
    

Configure a TCP half-open monitor

A TCP half-open monitor sends a SYN packet to the pool member. If the member responds with a SYN-ACK, the monitor marks it as available and sends a RST to close the connection. This approach avoids the overhead of a full TCP connection.

  1. Create or edit your pool YAML file:

     apiVersion: k8s.f5net.com/v1
     kind: F5BigCnePool
     metadata:
       name: tcp-half-open-pool
       namespace: default
     spec:
       members:
         - address: 22.22.22.100
           port: 8080
       monitors:
         tcpHalfOpen:
           - interval: 5
             timeout: 16
    
  2. Apply the pool configuration:

    oc apply -f tcp-half-open-pool.yaml
    

Configure a UDP monitor

A UDP monitor sends a datagram to the pool member and checks for an expected response. If the member returns the expected content, the monitor marks it as available.

  1. Create or edit your pool YAML file:

     apiVersion: k8s.f5net.com/v1
     kind: F5BigCnePool
     metadata:
       name: udp-pool
       namespace: default
     spec:
       members:
         - address: 22.22.22.100
           port: 8046
           priorityGroup: 0
       monitors:
         udp:
           interval: 5
           timeout: 16
           sendString: "Test"
           receiveString: "ABC"
           receiveDisableString: ""
    
  2. Apply the pool configuration:

    oc apply -f udp-pool.yaml
    

Configure an HTTP monitor

An HTTP monitor sends an HTTP request to a pool member and checks the response for expected content. Use this monitor type when your pool members serve HTTP traffic and you want to validate application-level health.

  1. Create or edit your pool YAML file:

     apiVersion: k8s.f5net.com/v1
     kind: F5BigCnePool
     metadata:
       name: http-pool
       namespace: default
     spec:
       members:
         - address: 22.22.22.100
           port: 8080
       monitors:
         http:
           - interval: 5
             timeout: 16
             sendString: "GET /probe-http HTTP/1.0\r\n\r\n"
             receiveString: ".*"
    
  2. Apply the pool configuration:

    oc apply -f http-pool.yaml
    

Configure an HTTPS monitor

An HTTPS monitor works like an HTTP monitor but sends requests over TLS. Use this monitor type when your pool members require encrypted connections for health checks.

  1. Create or edit your pool YAML file:

     apiVersion: k8s.f5net.com/v1
     kind: F5BigCnePool
     metadata:
       name: https-pool
       namespace: default
     spec:
       members:
         - address: 22.22.22.100
           port: 8046
           priorityGroup: 0
       monitors:
         https:
           interval: 5
           timeout: 16
           sendString: "GET / HTTP/1.1\r\n\r\n"
           receiveString: "200"
           receiveDisableString: ""
           username: "myuser"
           password: "mypass"
           serversslProfileName: my-serverssl-profile
    
  2. Apply the pool configuration:

    oc apply -f https-pool.yaml
    

Verify monitor status

  1. Connect to the debug sidecar.

    oc exec -it deploy/f5-tmm -c debug -n <project> -- bash 
    

    In this example, the debug sidecar is in the cnf-gateway Project:

    oc exec -it deploy/f5-tmm -c debug -n cnf-gateway -- bash
    
  2. Connect to TMM:

    bdt_cli -u -s tmm0:8850 [command] 
    
  3. Example routes:

    bdt_cli -u -s tmm0:8850 route
    
    routeType:1 isIpv6:false destNet:{ip:{addr:<none>, rd:0} pl:0} gw:{ip:{addr:10.59.147.121, rd:0}} gwType:1 interface:external
    routeType:1 isIpv6:false destNet:{ip:{addr:10.19.148.120, rd:0} pl:29} gw:{ip:{addr:<none>, rd:0}} gwType:0 interface:external
    routeType:1 isIpv6:false destNet:{ip:{addr:192.168.202.0, rd:0} pl:24} gw:{ip:{addr:<none>, rd:0}} gwType:0 interface:internal
    routeType:0 isIpv6:false destNet:{ip:{addr:169.254.1.1, rd:0} pl:32} gw:{ip:{addr:<none>, rd:0}} gwType:0 interface:eth0
    routeType:1 isIpv6:false destNet:{ip:{addr:169.254.0.0, rd:0} pl:24} gw:{ip:{addr:<none>, rd:0}} gwType:0 interface:tmm
    
  4. To verify the monitor status, run the following command:

    bdt_cli poolmember
    

    Sample Output:

    /bdt_cli poolmember
    poolName:qkviewPoolForDebugSidecar addr:169.254.0.253 port:19892 state:1 flags:2147881492
    poolName:qkviewPoolForTmm addr:169.254.0.253 port:19893 state:1 flags:2147881492
    poolName:default-mcp-gateway-22.22.22.1-http-8123-mcp-httproute-rule-0-pool addr:33.33.33.6 port:8123 state:1 flags:2164659732
    poolName:default-a2a-gateway-22.22.22.2-http-8124-a2a-httproute-rule-0-pool addr:33.33.33.1 port:8124 state:1 flags:2164659732
    poolName:default-mcp-gateway-22.22.22.1-http-8123-mcp-httproute-rule-0-pool addr:33.33.33.1 port:8123 state:1 flags:2164659732
    poolName:default-a2a-gateway-22.22.22.2-http-8124-a2a-httproute-rule-0-pool addr:33.33.33.6 port:8124 state:1 flags:2164659732
    poolName:qkviewPoolForTmstatsd addr:169.254.0.253 port:19891 state:1 flags:2147881492
    poolName:bgpConfigServerPool addr:169.254.0.253 port:8095 state:1 flags:2147881492
    poolName:qkviewPoolForTmmRouted addr:169.254.0.253 port:19896 state:1 flags:2147881492
    poolName:qkviewPoolForTmmBlobd addr:169.254.0.253 port:19897 state:1 flags:2147881492
    poolName:qkviewPoolForInitTmmRouting addr:169.254.0.253 port:19894 state:1 flags:2147881492
    poolName:qkviewPoolForTmmRouting addr:169.254.0.253 port:19895 state:1 flags:2147881492