Updated on 2025-04-03 GMT+08:00

ccictl apply view-last-applied

Scenario

View the latest last-applied-configuration annotations by type, name or file.

By default, the output is printed to stdout in YAML format. You can use the -o option to change the output format.

ccictl apply view-last-applied (TYPE [NAME | -l label] | TYPE/NAME | -f FILENAME)

Examples

# View the last-applied-configuration annotation by name or type or in YAML.
ccictl apply view-last-applied deployment/nginx

# View the last-applied-configuration annotations by file in JSON
ccictl apply view-last-applied -f deploy.yaml -o json

Options

--all

Select all resources in the namespace of the specified resource types.

-f, --filename strings

List of file names, directories, or URLs that contain the last-applied-configuration annotation.

-h, --help

Help information for view-last-applied

-o, --output string     Default: "yaml"

Output format. The value must be yaml or json.

-R, --recursive

Process the directory used in -f or --filename recursively. This option is useful when you want to manage related manifests organized within the same directory.

-l, --selector string

Selector used for filtering (label query). The value can be =, ==, or !=, for example, -l key1=value1,key2=value2. Matched objects must meet all specified label constraints.

The following ccictl options can also be used in subcommands:

Parent command options