温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Microk8s.ctr命令行与containerd怎么用

发布时间:2021-11-08 16:00:32 来源:亿速云 阅读:730 作者:小新 栏目:云计算

小编给大家分享一下Microk8s.ctr命令行与containerd怎么用,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!

Microk8s.ctr是用于microk8s下的容器管理(containerd,https://containerd.io)的命令,下面来探索一下其参数。

主要命令

ubuntu@ubuntu:/etc/systemd/system$ sudo microk8s.ctr  NAME:    ctr -          __   _____/ /______  / ___/ __/ ___/ / /__/ /_/ / \___/\__/_/ containerd CLI USAGE:    ctr [global options] command [command options] [arguments...] VERSION:    v1.2.5 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     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      shim                      interact with a shim directly      cri                       interact with cri plugin      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")    --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

查看容器镜像

ubuntu@ubuntu:/etc/systemd/system$ sudo microk8s.ctr images NAME:    ctr images - manage images USAGE:    ctr images command [command options] [arguments...] COMMANDS:      check       check that an image has all content available locally      export      export an image      import      import images      list, ls    list images known to containerd      pull        pull an image from a remote      push        push an image to a remote      remove, rm  remove one or more images by reference      label       set and clear labels for an image OPTIONS:    --help, -h  show help     ubuntu@ubuntu:/etc/systemd/system$ sudo microk8s.ctr images ls REF TYPE DIGEST SIZE PLATFORMS LABELS

查看容器实例

ubuntu@ubuntu:/etc/systemd/system$ sudo microk8s.ctr containers ls CONTAINER    IMAGE    RUNTIME     ubuntu@ubuntu:/etc/systemd/system$ sudo microk8s.ctr containers NAME:    ctr containers - manage containers USAGE:    ctr containers command [command options] [arguments...] COMMANDS:      create           create container      delete, del, rm  delete one or more existing containers      info             get info about a container      list, ls         list containers      label            set and clear labels for a container OPTIONS:    --help, -h  show help

看完了这篇文章,相信你对“Microk8s.ctr命令行与containerd怎么用”有了一定的了解,如果想了解更多相关知识,欢迎关注亿速云行业资讯频道,感谢各位的阅读!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI