[root@iZbp1ebizftw2vpbpm737wZ ~]# ctr --help NAME: ctr - __ _____/ /______ / ___/ __/ ___/ / /__/ /_/ / \___/\__/_/ containerd CLI USAGE: ctr [global options] command [command options] [arguments...] VERSION: v1.7.24 DESCRIPTION: ctr is an unsupported debug and administrative client for interacting with the containerd daemon. Because it is unsupported, the commands, options, and operations are not guaranteed to be backward compatible or stable from release to release of the containerd project. COMMANDS: plugins, plugin Provides information about containerd plugins version Print the client and server versions containers, c, container Manage containers content Manage content events, event Display containerd events images, image, i Manage images leases Manage leases namespaces, namespace, ns Manage namespaces pprof Provide golang pprof outputs for containerd run Run a container snapshots, snapshot Manage snapshots tasks, t, task Manage tasks install Install a new package oci OCI tools sandboxes, sandbox, sb, s Manage sandboxes info Print the server info deprecations shim Interact with a shim directly help, h Shows a list of commands or help for one command GLOBAL OPTIONS: --debug Enable debug output in logs --address value, -a value Address for containerd's GRPC server (default: "/run/containerd/containerd.sock") [$CONTAINERD_ADDRESS] --timeout value Total timeout for ctr commands (default: 0s) --connect-timeout value Timeout for connecting to containerd (default: 0s) --namespace value, -n value Namespace to use with commands (default: "default") [$CONTAINERD_NAMESPACE] --help, -h show help --version, -v print the version [root@iZbp1ebizftw2vpbpm737wZ ~]#
[root@iZbp1ebizftw2vpbpm737wZ ~]# ctr ns NAME: ctr namespaces - Manage namespaces USAGE: ctr namespaces command [command options] [arguments...] COMMANDS: create, c Create a new namespace list, ls List namespaces remove, rm Remove one or more namespaces label Set and clear labels for a namespace OPTIONS: --help, -h show help [root@iZbp1ebizftw2vpbpm737wZ ~]#
1 2 3 4 5 6 7 8 9 10 11
1. 查看当前ns [root@iZbp1ebizftw2vpbpm737wZ ~]# ctr ns ls
[root@iZbp1ebizftw2vpbpm737wZ ~]# ctr image NAME: ctr images - Manage images USAGE: ctr images command [command options] [arguments...] COMMANDS: check Check existing images to ensure all content is available locally export Export images import Import images list, ls List images known to containerd mount Mount an image to a target path unmount Unmount the image from the target pull Pull an image from a remote push Push an image to a remote prune Remove unused images delete, del, remove, rm Remove one or more images by reference tag Tag an image label Set and clear labels for an image convert Convert an image usage Display usage of snapshots for a given image ref OPTIONS: --help, -h show help [root@iZbp1ebizftw2vpbpm737wZ ~]#