QKView API and iHealth

The BIG-IP Next for Kubernetes Cluster Wide Controller (CWC) has been enhanced to support the QKView API to run the QKView command.

QKView REST APIs

Use the Procedure section to see how the QKView API can be used to run jobs.

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=""

POST Request Body

{
 filename: <name_of_tar_file_that_gets_generated_from_qkview>
}

Command Examples

The commands below are run in the same directory as the cert-gen directory created when setting up the BIG-IP Next for Kubernetes CWC.

QKVIEW

curl -H "Accept: application/json" \
-H "Content-type: application/json"\
-X POST  https://f5-spk-cwc.f5-utils:30881/qkview?namespace="" \
--cert api-server-secrets/ssl/client/certs/client_certificate.pem \
--key api-server-secrets/ssl/client/secrets/client_key.pem \
--cacert api-server-secrets/ssl/ca/certs/ca_certificate.pem \
--data-raw '{"filename": "/bin/test.json"}'

GET Requests

Use the QKView GET API to retrieve the required Job ID response and to get the tar file downloaded to our system.

GET API Request for getting the Job ID Response

Can query to get the Job ID response to the completed job as shown below:

curl https://f5-spk-cwc.f5-utils:30881/qkview?jobId=<JOB_ID> \
--cert client_certificate.pem \
--key client_key.pem \
--cacert ca_certificate.pem

Can query even without Job ID as a query parameter, then it takes latest jobId into consideration.

curl https://f5-spk-cwc.f5-utils:30881/qkview \
--cert client_certificate.pem \
--key client_key.pem \
--cacert ca_certificate.pem

DELETE Requests

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

DELETE API Request for getting the Job ID Response

Can delete the Job ID or all Job Ids from persistent volume:

curl https://f5-spk-cwc.f5-utils:30881/qkview?jobId=<JOB_ID> \
-X DELETE  \
--cert client_certificate.pem \
--key client_key.pem \
--cacert ca_certificate.pem

Can query even without Job ID as a query parameter, then it takes latest jobId into consideration.

curl https://f5-spk-cwc.f5-utils:30881/qkview \
-X DELETE \
--cert client_certificate.pem \
--key client_key.pem \
--cacert ca_certificate.pem

Procedure

Use this procedure to ping a remote host from the QKView sidecar using the CWC QKView API.

  1. As described in the BIG-IP Next for Kubernetes Licensing guide, create a new directory for the CWC REST API certificates:

    mkdir cwc_api
    
  2. Copy each of the certificates into the new directory:

    cp api-server-secrets/ssl/client/certs/client_certificate.pem cwc_api
    
    cp api-server-secrets/ssl/ca/certs/ca_certificate.pem cwc_api
    
    cp api-server-secrets/ssl/client/secrets/client_key.pem cwc_api
    
  3. Obtain the name of namespace that has atleast 1 pod running in the Project:

    In this example, the CWC is in the f5-utils namespace, and the TMM Pod(s) are in the default namespace.

    curl -s https://f5-spk-cwc.f5-utils:30881/qkview?namespace="default"\
    --cert cwc_api/client_certificate.pem  \
    --key cwc_api/client_key.pem \
    --cacert cwc_api/ca_certificate.pem
    

    In this example, the job ID is 4625993b-31e2-4570-8b41-2c1296026c16.

    JobID: 4625993b-31e2-4570-8b41-2c1296026c16
    
  4. Use the job ID to get the tar file:

    curl https://f5-spk-cwc.f5-utils:30881/qkview?jobId="4625993b-31e2-4570-8b41-2c1296026c16" \
    --cert cwc_api/client_certificate.pem  \
    --key cwc_api/client_key.pem \
    --cacert cwc_api/ca_certificate.pem --output qkview180501.tar.gz\
    

Uploading to iHealth

Use these steps to upload the QKView diagnostic tarball to the iHealth website.

  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