Cloud Docs Home > F5 Container Integrations Index

Deploy iApps - Kubernetes/OpenShift

The BIG-IP Controller can deploy any iApp on a BIG-IP device using the k8s-bigip-ctlr 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.

Note

You can use the BIG-IP Controller to deploy iApps in standard Kubernetes and OpenShift environments.

If using the OpenShift CLI, substitute oc for kubectl in the examples provided.

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.

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

See also

See the k8s-bigip-ctlr reference documentation for detailed information about iApp resources.

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:
      # schema v.0.1.4 is required as of k8s-bigip-ctlr v1.3.0
      schema: "f5schemadb://bigip-virtual-server_v0.1.4.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 the Kubernetes/OpenShift API server.

    kubectl
    kubectl create -f f5-resource-vs-iApp-example.configmap.yaml [--namespace=<service-namespace>]
    configmap "k8s.http" created
    
    openshift cli
    oc create -f f5-resource-vs-iApp-example.configmap.yaml [--namespace=<service-namespace>]
    configmap "k8s.http" created
    
  3. Verify creation of the iApp and its related objects on the BIG-IP system. 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 the Service appears in the list, in the correct partition.

Important

If you see a traffic group configuration error, please see iApp traffic group configuration error in the Troubleshooting documentation.

Delete iApp objects

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

    kubectl
    kubectl delete configmap k8s.f5http
    configmap "k8s.f5http" deleted
    
    openshift cli
    oc 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.