Managing Images with ac
Use the ac image commands to work with Alauda Container Platform Registry and the
Image API. Alauda Container Platform Registry in ACP 4.4 uses the
modern registry mode and provides Image and ImageStream workflows for
clusters.
TOC
PrerequisitesRegistry ModeCommand GroupsDiscover and Log In to the RegistryManage ImageStreamsQuery Images and ImageStreamsDelete Image ReferencesWork with OCI Images DirectlyPrerequisites
- The
acCLI is installed and authenticated to the target cluster. - The Registry and the
image.alauda.io/v1Image API are available. - You have the required permissions for the ImageStream, Image, and workload resources used by the command.
Registry Mode
ac selects the image backend from the current cluster's registry mode:
Check and set the mode:
Use modern mode before managing ImageStreams, importing images, tagging images, or viewing Image
API usage through the Image API graph.
Command Groups
Administrative usage reporting, cleanup, and trust verification are documented in Managing access and cleanup.
Discover and Log In to the Registry
Print the Registry host selected by the current registry mode:
Print the internal host:
Print the public host discovered from the configured external route:
Check that the Registry /v2/ endpoint is reachable:
Write Registry credentials to the default local credential file:
Write credentials to a temporary or CI auth file:
Expected result:
- The Registry credentials are written to
/tmp/registry-auth/config.jsonand are available to subsequent direct image commands throughREGISTRY_AUTH_FILE.
--to and --registry-config (or -a) select the output auth file for ac registry login.
Use --skip-check when the Registry endpoint is not reachable from the current machine but the
credential file still needs to be written. Use --insecure only when the endpoint is HTTP or uses a
certificate that the client does not trust.
Manage ImageStreams
Create an empty ImageStream:
Create an ImageStream with local image lookup enabled:
Create an ImageStreamTag from an external image:
Import an external image into an ImageStreamTag. Without --confirm, the command previews the import. Add --confirm to persist the tag:
Verify the persisted ImageStreamTag:
Expected result:
- The ImageStreamTag contains the imported image reference and digest.
Common import options:
Tag an external image into an ImageStreamTag:
Copy the current image behind one ImageStreamTag to another:
Use tag options to control tracking and import behavior:
--alias requires the source and destination to be in the same ImageStream. The --scheduled and
--insecure options apply to external image sources.
Delete a tag:
Enable local image lookup for one ImageStream:
Disable local image lookup:
List local lookup state:
Set a workload image from the current ImageStreamTag pull specification:
Set a workload image from an ImageStreamImage digest:
Verify the workload update:
Expected result:
- The Deployment uses the pull specification resolved from the ImageStream resource, and the rollout completes successfully.
Query Images and ImageStreams
List ImageStreams:
Show an ImageStream:
Show the current digest and tag history for a tag:
Show ImageStreamImage metadata by digest:
List images through the integrated Registry command:
In modern mode, ac get images lists cluster-scoped Image resources with NAME and IMAGE REFERENCE columns.
Use structured output:
Delete Image References
The preferred Registry workflow is to delete ImageStream tags:
The ac delete images command follows the selected registry mode. It is a dry run unless --confirm is set:
Use repeated --repo flags to delete multiple tag references:
Deleting image references does not necessarily release blob storage immediately. Run image pruning and registry garbage collection separately when storage reclamation is required.
Work with OCI Images Directly
Show image metadata from a registry:
Select one platform from a multi-architecture image:
Show manifest list entries:
Copy one image to another tag:
Copy multiple images from a mapping file:
--skip-missing continues when an input image is not found. --filter-by-os selects the requested
platform; combine it with --keep-manifest-list when the destination must remain a
multi-architecture manifest list containing the selected platform entries.
Verify a copied image:
Add layers or metadata to an image and push the result:
Preview the append operation:
The --image option merges a JSON object into the runtime image configuration. The --meta option
merges a JSON object into the top-level image metadata. You can also use --drop-history or
--created-at without adding a layer:
Expected result:
ac image appendpushes the resulting image, or prints the planned action with--dry-run.--keep-manifest-listpreserves the multi-architecture index while applying the append operation to matching platform images.
Extract files from an image without a local container runtime:
Extract selected files to the current directory:
Preview an extraction without writing files:
Expected result:
--filewrites the requested file to the current directory.--dry-runlists files that would be extracted and does not write image contents.
Use --insecure on ac image commands only for test registries, HTTP endpoints, or private certificates that are not trusted by the client.