Get¶
The get
collector is used to list and print resources in the cluster.
Configuration¶
Reference documentation
- The full structure of the
Get
resource is documented here.
Deprecated syntax
You can specify the resource
directly instead of using apiVersion
and kind
.
This is a deprecated syntax though and will be removed in a future version.
Clustered resources¶
When used with a clustered resource, the namespace
is ignored and is not added to the corresponding kubectl
command.
All namespaces¶
When used with a namespaced resource, it is possible to consider all namespaces in the cluster by setting namespace: '*'
.
Usage examples¶
Single resource¶
If a name
is specified, Chainsaw will retrieve the specified resource in the test namespace.
Get pod in the test namespace
If a namespace
is specified, Chainsaw will retrieve the specified resource in the specified namespace.
Collect pod in a specific namespace
All resources¶
If no name
and namespace
are specified, Chainsaw will retrieve all resources in the test namespace.
Collect all resources in the test namespace
On the other hand, if a namespace
is specified, Chainsaw will retrieve all resources in the specified namespace.
Collect all resources in a specific namespace
Label selector¶
An optional label selector can be configured to refine the resources to be retrieved.
Collect resources using a label selector in the test namespace
If a namespace
is specified, Chainsaw will retrieve resources using the specified namespace.
Collect resources using a label selector in a specific namespace
Format¶
An optional format
can be specified. Supported formats are json
and yaml
.
If format
is not specified, results will be returned in text format.
Use json format