QKView and iHealth

Overview

The QKView utility collects diagnostic data about the cluster, the SPK Pods, and information about the SPK configurations such as Custom Resources, secrets, serviceAccounts, configMaps, etc. The collected data is stored in a diagnostic tarball that can be uploaded to the iHealth website and reviewed by your team, or shared with F5 Support when opening a support case.

Note: The SPK 1.7.0 QKView is considered Early Access (EA). EA features are unsupported, and are made available to get customer feedback on feature functionality and stability.

This document demonstrates how to run the QKView utility on you local workstation, and upload the file to the iHealth website.

Note:

Ensure you have:

Use script to collect Custom or Kubernetes resources

To include all CRs and additional Kubernetes resources (For example, ConfigMaps) in the QKView, you can use the script to discover what the CWC’s RBAC permits and generate resources.

  1. Download and extract the Kube Resources file.

  2. Perform chmod +x get_kube_resources.sh command to make the file executable.

  3. Execute ./get_kube_resources.sh -n <cwcNamespace> to run the shell script. For example, ./get_kube_resources.sh -n f5-utils where f5-utils is the namespace where cwc is deployed.

  4. Copy the output (JSON payload) and paste it in the kube_resources section of QKView request.

QKView REST APIs

The API commands used in QKView.

POST Request

Use the POST request to create new job IDs. You can request from the CWC to run a QKView job on a container by POSTing a request using /QKView API.

Note: You can create only single job running at a time.

POST Request CWC API Endpoint

https://f5-spk-cwc.f5-utils:30881/qkview?namespace=""

Note: QKview will collect data from the namespace if a namespace is specified in the POST request. If the namespace is not specified in the POST request, data is collected from all the available namespaces in the cluster.

POST Request Body

{
 filename: <name_of_tar_file_that_gets_generated_from_qkview>
}

QKVIEW

curl -X POST https://f5-spk-cwc.f5-utils:30881/v1/qkview  --cert client_certificate --cacert ca_certificate --key client_key -k -d <scriptOutput-JSONpayload>

Example:

curl -X POST https://f5-spk-cwc.f5-utils:30881/v1/qkview/7af760ad-815b-471e-a6ba-d94a7d9c4c6a/status --cert client_certificate --cacert ca_certificate --key client_key -k -d "
{"kube_resources":[{"group_version_resource":{"group":"","version":"v1","resource":"configmaps"},"name_patterns":["*"]},{"group_version_resource":{"group":"","version":"v1","resource":"endpoints"},"name_patterns":["*"]},{"group_version_resource":{"group":"","version":"v1","resource":"events"},"name_patterns":["*"]},{"group_version_resource":{"group":"","version":"v1","resource":"pods"},"name_patterns":["*"]},{"group_version_resource":{"group":"","version":"v1","resource":"secrets"},"name_patterns":["*"]},{"group_version_resource":{"group":"","version":"v1","resource":"services"},"name_patterns":["*"]},{"group_version_resource":{"group":"apps","version":"v1","resource":"daemonsets"},"name_patterns":["*"]},{"group_version_resource":{"group":"apps","version":"v1","resource":"deployments"},"name_patterns":["*"]},{"group_version_resource":{"group":"events.k8s.io","version":"v1","resource":"events"},"name_patterns":["*"]},{"group_version_resource":{"group":"gateway.k8s.f5net.com","version":"v1","resource":"bnknetpolicies"},"name_patterns":["*"]},{"group_version_resource":{"group":"gateway.k8s.f5net.com","version":"v1","resource":"l4routes"},"name_patterns":["*"]},{"group_version_resource":{"group":"gateway.networking.k8s.io","version":"v1","resource":"backendlbpolicies"},"name_patterns":["*"]},{"group_version_resource":{"group":"gateway.networking.k8s.io","version":"v1","resource":"backendtlspolicies"},"name_patterns":["*"]},{"group_version_resource":{"group":"gateway.networking.k8s.io","version":"v1","resource":"gateways"},"name_patterns":["*"]},{"group_version_resource":{"group":"gateway.networking.k8s.io","version":"v1","resource":"grpcroutes"},"name_patterns":["*"]},{"group_version_resource":{"group":"gateway.networking.k8s.io","version":"v1","resource":"httproutes"},"name_patterns":["*"]},{"group_version_resource":{"group":"gateway.networking.k8s.io","version":"v1","resource":"referencegrants"},"name_patterns":["*"]},{"group_version_resource":{"group":"gateway.networking.k8s.io","version":"v1","resource":"tcproutes"},"name_patterns":["*"]},{"group_version_resource":{"group":"gateway.networking.k8s.io","version":"v1","resource":"tlsroutes"},"name_patterns":["*"]},{"group_version_resource":{"group":"gateway.networking.k8s.io","version":"v1","resource":"udproutes"},"name_patterns":["*"]},{"group_version_resource":{"group":"ingresstcp.k8s.f5net.com","version":"v1","resource":"f5-spk-ingresstcps"},"name_patterns":["*"]},{"group_version_resource":{"group":"ingressudp.k8s.f5net.com","version":"v1","resource":"f5-spk-ingressudps"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-big-cne-addresslists"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-big-cne-irules"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-big-cne-portlists"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-big-context-globals"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-big-context-secures"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-big-ddos-globals"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-big-fw-policies"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-big-fw-rulelists"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-big-log-hslpubs"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-big-log-profiles"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-bnkgateways"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-addresslists"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-dnscaches"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-egressdiameters"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-egresses"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-egresshttp2s"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-global-optionses"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-ingressdiameters"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-ingressegressudps"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-ingressgtps"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-ingresshttp2s"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-ingressngaps"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-ingresssips"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-pools"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-portlists"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-servicetypelbippools"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-snatpools"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-statefulsets"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-staticroutes"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-traffic-distributions"},"name_patterns":["*"]},{"group_version_resource":{"group":"k8s.f5net.com","version":"v3","resource":"f5-spk-vlans"},"name_patterns":["*"]},{"group_version_resource":{"group":"metrics.k8s.io","version":"v1beta1","resource":"pods"},"name_patterns":["*"]}]"

GET Requests

Get Request to obtain the QKview Status

Use the QKView GET API to retrieve the status.

curl -X GET https://f5-spk-cwc.f5-utils:30881/v1/qkview/<job id>/status --cert client_certificate --cacert ca_certificate --key client_key -k 

Example:

curl -X GET https://f5-spk-cwc.f5-utils:30881/v1/qkview/7af760ad-815b-471e-a6ba-d94a7d9c4c6a/status --cert client_certificate --cacert ca_certificate --key client_key -k

If the status is complete, QKview tarball can be downloaded.

GET API Request to download the QKview tar

Use the following query to download the QKview tar.

curl -X GET https://f5-spk-cwc.f5-utils:30881/v1/qkview/<job id>/download --cert client_certificate --cacert ca_certificate --key client_key -k --output qkview.tar.gz 

Example:

curl -X GET https://f5-spk-cwc.f5-utils:30881/v1/qkview/7af760ad-815b-471e-a6ba-d94a7d9c4c6a/download --cert client_certificat--cacert ca_certificate --key client_key -k --output qkview.tar.gz

Note: You can query even without Job ID as a query parameter, then it takes latest jobId into consideration.

DELETE Requests

Use the QKView DELETE API to delete all jobIds or a particular jobId from the persistent volume.

Delete a specific qkview by its unique identifier

curl -X DELETE https://f5-spk-cwc.f5-utils:30881/v1/qkview/<job id> --cert client_certificate --cacert ca_certificate --key client_key -k

Example:

curl -X DELETE https://f5-spk-cwc.f5-utils:30881/v1/qkview/7af760ad-815b-471e-a6ba-d94a7d9c4c6a --cert client_certificat--cacert ca_certificate --key client_key -k --output qkview.tar.gz

Procedures

Use the procedures below to generate the qkview diagnostic tarball, collect resources and upload it to the iHealth website.

Generating the QKView File

To generate the QKView diagnostic tarball, follow the below instructions:

  1. Download the QKView tarball, and the QKView md5sum files.

  2. Verify the integrity of the downloaded file.

    Note: The output from the cat and the md5sum commands should match.

    cat qkview-packaging.tar.gz.md5
    
    9c5450dcef6009ce3c153d2c29f2c8ad  qkview-packaging.tar.gz
    
    md5sum qkview-packaging.tar.gz
    
    9c5450dcef6009ce3c153d2c29f2c8ad  qkview-packaging.tar.gz
    
  3. Extract the qkview-packaging.tar.gz file.

    tar xvf qkview-packaging.tar.gz
    
  4. List the qkview files.

    ls -1
    

    The following files should be available.

    qkview-collector.sh
    qkview-packaging.tar.gz
    qkview-packaging.tar.gz.md5
    qkview-wrapper-darwin
    qkview-wrapper-linux
    
  5. Ensure the QKView files are executable.

    chmod 755 qkview-wrapper-* qkview-collector.sh
    
  6. Run the following command to see usage on Mac.

    ./qkview-wrapper-darwin -h 
    
  7. Run the following command to see usage on Linux.

    ./qkview-wrapper-linux -h 
    
  8. Run the qkview utility for your type of workstation: Linux or Darwin (Mac): to collect qkview for multiple namespaces.

    ./qkview-wrapper-darwin -f ./qkview-collector.sh -n <SPK namespace>,<watched 1>,<watched 2>
    

    In this example, the -n option targets the namespace to gather data from.

    ./qkview-wrapper-darwin -f ./qkview-collector.sh -n spk-ingress,spk-watchns1,spk-watchns2
    
  9. The completed diagnostic file will appear in the directory as shown below.

    iHealth_qkview-packaging.tar.gz
    
  10. Continue to the next section.

Uploading the QKView File to iHealth

Important: The maximum file size for a QKView diagnostic tarball uploaded to iHealth is 4GB.

If the QKView diagnostic tarball size exceeds 4GB, we recommend users apply the following filtering options available in the QKView API to reduce the file size:

• Limit collection to only the relevant pods instead of the entire cluster.
• Collect only specific logs instead of all container logs.
• Apply log filters (e.g., only error or warning level entries) to avoid collecting unnecessary data.

These filtering options help tailor the QKView output to what’s actually needed, significantly reducing the tarball size. Users should refer to the QKView API documentation to explore and apply these and other options effectively.

To upload the QKView diagnostic tarball to the iHealth website, follow the below instructions:

  1. Log in to the iHealth website at https://ihealth.f5.com/qkview-analyzer/.

  2. Click Upload toward the top left.

  3. Click Choose and navigate to the iHealth_qkview-packaging.tar.gz file on your local workstation.

  4. Click Open.

  5. If you opened a support case, add the case number to the F5 Support Case (SR) field.

  6. Click Upload QKView(s).

  7. The uploaded qkview link will appear at the top of the list and can be used to view the collected data.

Feedback

Provide feedback to improve this document by emailing spkdocs@f5.com.

Supplemental