F5 Container Integrations v1.1

Current Page

Application Services Proxy

Cloud Foundry

Kubernetes

Mesos Marathon

OpenShift

Support

Troubleshooting

Tutorials

Cloud Docs Home > F5 Container Integrations Index

Deploy iApps with BIG-IP Controller for Kubernetes

The BIG-IP Controller can deploy any iApp on a BIG-IP device via a set of iApp configuration parameters. The iApp must exist on your BIG-IP before BIG-IP Controller attempts to deploy it. The steps presented here apply to any built-in or custom iApp.

If you prefer not to use iApps, you can also manage BIG-IP objects directly with BIG-IP Controller.

Define the F5 Resource

The example F5 resource JSON blob shown below defines the f5.http iApp. The iappVariables configuration parameters correspond to fields in the iApp template ‘s presentation section. You can create iApp variables for any built-in or custom iApp.

See also

The k8s-bigip-ctlr product documentation for detailed information about iApp resources.

Example F5 iApp Resource definition
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
  "virtualServer": {
    "backend": {
      "serviceName": "myService",
      "servicePort": 3000
    },
    "frontend": {
      "partition": "kubernetes",
      "iapp": "/Common/f5.http",
      "iappPoolMemberTable": {
        "name": "pool__members",
        "columns": [
            {"name": "addr", "kind": "IPAddress"},
            {"name": "port", "kind": "Port"},
            {"name": "connection_limit", "value": "0"}
        ]
      },
      "iappOptions": {
        "description": "myService_f5.http iApp"
      },
      "iappVariables": {
        "monitor__monitor": "/#create_new#",
        "monitor__response": "none",
        "monitor__uri": "/",
        "net__client_mode": "wan",
        "net__server_mode": "lan",
        "pool__addr": "127.0.0.2",
        "pool__pool_to_use": "/#create_new#",
        "pool__port": "4430"
      }
    }
  }
}

Download f5-resource-vs-iApp-example.json

Deploy the iApp

  1. Create a ConfigMap with the encoded data.

    Example ConfigMap with F5 virtual server resource
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    kind: ConfigMap
    apiVersion: v1
    metadata:
      name: k8s.http
      namespace: default
      labels:
        f5type: virtual-server
    data:
      # If you're running v1.0, use schema v0.1.2
      schema: "f5schemadb://bigip-virtual-server_v0.1.3.json"
      data: |
        {
          "virtualServer": {
            "backend": {
              "serviceName": "myService",
              "servicePort": 3000
            },
            "frontend": {
              "partition": "kubernetes",
              "iapp": "/Common/f5.http",
              "iappPoolMemberTable": {
                "name": "pool__members",
                "columns": [
                    {"name": "addr", "kind": "IPAddress"},
                    {"name": "port", "kind": "Port"},
                    {"name": "connection_limit", "value": "0"}
                ]
              },
              "iappOptions": {
                "description": "myService_f5.http iApp"
              },
              "iappVariables": {
                "monitor__monitor": "/#create_new#",
                "monitor__response": "none",
                "monitor__uri": "/",
                "net__client_mode": "wan",
                "net__server_mode": "lan",
                "pool__addr": "127.0.0.2",
                "pool__pool_to_use": "/#create_new#",
                "pool__port": "4430"
              }
            }
          }
        }
    

    f5-resource-vs-iApp-example.configmap.yaml

  2. Upload the ConfigMap to Kubernetes.

    user@k8s-master:~$ kubectl create -f f5-resource-vs-example.configmap.yaml --namespace=<service-namespace>
    configmap "" created
    
  3. Verify creation of the iApp, and its related objects, on the BIG-IP. This is most easily done via the configuration utility:

    • Log in to the BIG-IP configuration utility.
    • Go to iApps ‣ Application Services.
    • Verify that a new item prefixed with the name of your Kubernetes Service appears in the list, in the correct partition.

Delete iApp objects

  1. Remove the ConfigMap from the Kubernetes API server to delete the corresponding objects from the BIG-IP.

    user@k8s-master:~$ kubectl delete configmap k8s.f5http
    configmap "k8s.f5http" deleted
    
  2. Verify the iApp and its related objects no longer exist on the BIG-IP.

    • Log in to the BIG-IP configuration utility.
    • Go to iApps ‣ Application Services.
    • Verify that the item prefixed with the name of your Kubernetes Service no longer appears in the list for your partition.