Overview¶
This is the QKView API documentation.
API (1.0.0)
Download OpenAPI specification:
API to handle qkview operations
The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format:
{
"code": 404
"message": "page not found"
}
Create a new qkview
Request Body schema: application/jsonoptional
namespace | string The namespace from which the qkview should be collected.
|
filename | string^[a-zA-Z0-9_-]+$ Default: "The auto-generated qkview unique identifier" Assign the specified name to the qkview tarball. Only alphanumeric characters, underscores, and hyphens are allowed.
|
prefer_ipv6 | boolean Default: false Prefer IPv6 for communication with pods when dual-stack is enabled Otherwise, use IPv4. |
pod_patterns | Array of strings (pattern) Default: ["*"] Pattern reports whether name or file name matches the shell pattern. The pattern syntax is: pattern:
term:
character-range:
Requires pattern to match all of name, not just a substring. examples:
|
Array of objects Log Queries use LogQL; (Log Query Language) to filter, parse, and analyze logs stored in f5-fluentd, which are included in the qkview tarball. Queries must not begin with a stream selector, as qkview automatically appends its own selector. Failing to follow this rule will result in an error, causing the qkview task to fail. Each query is mapped to a file pattern, allowing different queries to be applied to different files.
The file pattern must correspond to either the absolute path or the relative path within the f5-fluentd pod. Queries will not alter the resulting line format; log lines will be written to qkview exactly as they were originally recorded by their respective processes. For example, the following query modifies the log line format.
However, since the query returns true for all log lines, qkview will write the log lines in their original, unaltered format. Instead, use
You can use
Note: If a customized
| |
object or null Default: null Core file settings to include in the qkview: By default, qkview excludes core files. This setting applies to each individual coremon, which refers to each node. For example, if there are 3 coremons and the maximum number of files is set to 2, the total would be 3 * 2. To limit the core files for a specific node, include the full
coremon pod name in the Note: If a customized
| |
Array of objects Kubernetes resources to collect and include in the qkview: The qkview will query the Kubernetes API using the provided Group, Version, and Resource to list all available objects. It will then filter the objects to include by performing a match on the first match found; the object will be marshaled to YAML format and written to the tarball. Objects that do not match are discarded. If the given Group Version Resource (GVR) is namespace-scoped, qkview will use the namespace specified in the request body. By default, qkview collects the following:
The defaults are always running and cannot be excluded, but their patterns can be overridden. For example, to change the pod pattern from
Adding Custom Resources:
Obtaining a GVR for a Custom Resource (CR): • The Kubernetes API follows a standardized structure known as Group Version Resource (GVR). If you are unsure of the specific GVR for your custom resource, you can run: kubectl api-resources This command will list all available resources with columns for:
For example: Suppose the output of kubectl api-resources shows:
From this, we can derive the GVR for
|
Responses
Request samples
- Payload
{- "namespace": "default",
- "filename": "vlan-issue",
- "prefer_ipv6": true,
- "pod_patterns": [
- "f5-f5ingress-7c7db7d6f6-gvkd6",
- "f5-tmm*",
- "f5-coremond*"
], - "log_queries": [
- {
- "file_pattern": "f5-f5ingress-7c7db7d6f6-gvkd6/f5ingress*",
- "query": "| logfmt | vlan=\"vlan101\" or namespace=\"tcpapp\""
}, - {
- "file_pattern": "f5-tmm*/*",
- "query": "|~ error"
}
], - "core_files": {
- "max_files": 2,
- "file_patterns": [
- "f5-tmm*"
]
}, - "kube_resources": [
- {
- "group_version_resource": {
- "group": "k8s.f5.com",
- "version": "v1",
- "resource": "bnkgatewayclasses"
}, - "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": "v1alpha2",
- "resource": "tcproutes"
}, - "name_patterns": [
- "f5*"
]
}, - {
- "group_version_resource": {
- "group": "",
- "version": "v1",
- "resource": "nodes"
}, - "name_patterns": [
- "*"
]
}
]
}
Response samples
- 201
- 500
{- "id": "123e4567-e89b-12d3-a456-426614174000"
}
Retrieve a list of created qkviews
query Parameters
filename | string Filter qkviews by filename |
Responses
Response samples
- 200
- 500
[- {
- "namespace": "default",
- "filename": "vlan-issue",
- "prefer_ipv6": true,
- "pod_patterns": [
- "f5-f5ingress-7c7db7d6f6-gvkd6",
- "f5-tmm*",
- "f5-coremond*"
], - "log_queries": [
- {
- "file_pattern": "f5-f5ingress-7c7db7d6f6-gvkd6/f5ingress*",
- "query": "| logfmt | vlan=\"vlan101\" or namespace=\"tcpapp\""
}, - {
- "file_pattern": "f5-tmm*/*",
- "query": "|~ error"
}
], - "core_files": {
- "max_files": 2,
- "file_patterns": [
- "f5-tmm*"
]
}, - "kube_resources": [
- {
- "group_version_resource": {
- "group": "k8s.f5.com",
- "version": "v1",
- "resource": "bnkgatewayclasses"
}, - "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": "v1alpha2",
- "resource": "tcproutes"
}, - "name_patterns": [
- "f5*"
]
}, - {
- "group_version_resource": {
- "group": "",
- "version": "v1",
- "resource": "nodes"
}, - "name_patterns": [
- "*"
]
}
]
}
]
Retrieve a specific qkview by its unique identifier
path Parameters
id required | string The unique identifier of the qkview |
Responses
Response samples
- 200
- 404
- 500
{- "namespace": "default",
- "filename": "vlan-issue",
- "prefer_ipv6": true,
- "pod_patterns": [
- "f5-f5ingress-7c7db7d6f6-gvkd6",
- "f5-tmm*",
- "f5-coremond*"
], - "log_queries": [
- {
- "file_pattern": "f5-f5ingress-7c7db7d6f6-gvkd6/f5ingress*",
- "query": "| logfmt | vlan=\"vlan101\" or namespace=\"tcpapp\""
}, - {
- "file_pattern": "f5-tmm*/*",
- "query": "|~ error"
}
], - "core_files": {
- "max_files": 2,
- "file_patterns": [
- "f5-tmm*"
]
}, - "kube_resources": [
- {
- "group_version_resource": {
- "group": "k8s.f5.com",
- "version": "v1",
- "resource": "bnkgatewayclasses"
}, - "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": "v1alpha2",
- "resource": "tcproutes"
}, - "name_patterns": [
- "f5*"
]
}, - {
- "group_version_resource": {
- "group": "",
- "version": "v1",
- "resource": "nodes"
}, - "name_patterns": [
- "*"
]
}
]
}
Retrieve the status of a specific qkview by its unique identifier
path Parameters
id required | string The unique identifier of the qkview |
Responses
Response samples
- 200
- 404
- 500
{- "status": "Failed",
- "nested": {
- "qkview workflow": {
- "status": "Failed",
- "nested": {
- "endpoints": {
- "status": "Failed",
- "nested": {
- "f5-tmm-98f4b44f4-rw6c5": {
- "status": "Completed"
}, - "f5-tmm-5545b59c94-nxb2t": {
- "status": "Completed"
}, - "f5-cwc-dc9f75cbb-qgvqx": {
- "status": "Failed",
- "msgs": [
- "tasks/endpoint: Connection refused. Unable to establish a connection to the server."
]
}
}
}
}, - "tarball: vlan.tar.gz": {
- "status": "Completed"
}
}
}
}