首页 > 其他分享 >crictl安装

crictl安装

时间:2022-10-11 15:14:49浏览次数:57  
标签:run default image unix crictl 安装 more

crictl介绍

crictl 是 CRI 兼容的容器运行时命令行接口,和containerd无关,由Kubernetes提供,可以使用它来检查和调试 k8s 节点上的容器运行时和应用程序。

安装crictl

下载地址:https://github.com/kubernetes-sigs/cri-tools/releases

~# VERSION="v1.25.0"
~# wget https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-$VERSION-linux-amd64.tar.gz
~# sudo tar zxvf crictl-$VERSION-linux-amd64.tar.gz -C /usr/local/bin
~#  rm -f crictl-$VERSION-linux-amd64.tar.gz

crictl使用

~# crictl 
NAME:
   crictl - client for CRI

USAGE:
   crictl [global options] command [command options] [arguments...]

VERSION:
   v1.25.0

COMMANDS:
   attach              Attach to a running container
   create              Create a new container
   exec                Run a command in a running container
   version             Display runtime version information
   images, image, img  List images
   inspect             Display the status of one or more containers
   inspecti            Return the status of one or more images
   imagefsinfo         Return image filesystem info
   inspectp            Display the status of one or more pods
   logs                Fetch the logs of a container
   port-forward        Forward local port to a pod
   ps                  List containers
   pull                Pull an image from a registry
   run                 Run a new container inside a sandbox
   runp                Run a new pod
   rm                  Remove one or more containers
   rmi                 Remove one or more images
   rmp                 Remove one or more pods
   pods                List pods
   start               Start one or more created containers
   info                Display information of the container runtime
   stop                Stop one or more running containers
   stopp               Stop one or more running pods
   update              Update one or more running containers
   config              Get and set crictl client configuration options
   stats               List container(s) resource usage statistics
   statsp              List pod resource usage statistics
   completion          Output shell completion code
   checkpoint          Checkpoint one or more running containers
   help, h             Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --config value, -c value            Location of the client config file. If not specified and the default does not exist, the program's directory is searched as well (default: "/etc/crictl.yaml") [$CRI_CONFIG_FILE]
   --debug, -D                         Enable debug mode (default: false)
   --help, -h                          show help (default: false)
   --image-endpoint value, -i value    Endpoint of CRI image manager service (default: uses 'runtime-endpoint' setting) [$IMAGE_SERVICE_ENDPOINT]
   --runtime-endpoint value, -r value  Endpoint of CRI container runtime service (default: uses in order the first successful one of [unix:///var/run/dockershim.sock unix:///run/containerd/containerd.sock unix:///run/crio/crio.sock unix:///var/run/cri-dockerd.sock]). Default is now deprecated and the endpoint should be set instead. [$CONTAINER_RUNTIME_ENDPOINT]
   --timeout value, -t value           Timeout of connecting to the server in seconds (e.g. 2s, 20s.). 0 or less is set to default (default: 2s)
   --version, -v                       print the version (default: false)
   

配置crictl

Unix

unix:///var/run/dockershim.sock or
unix:///run/containerd/containerd.sock or
unix:///run/crio/crio.sock or
unix:///var/run/cri-dockerd.sock

配置crictl选项

   runtime-endpoint:       Container runtime endpoint
   image-endpoint:         Image endpoint
   timeout:                Timeout of connecting to server (default: 2s)
   debug:                  Enable debug output (default: false)
   pull-image-on-create:   Enable pulling image on create requests (default: false)
   disable-pull-on-run:    Disable pulling image on run requests (default: false)

配置crictl示例

cat /etc/crictl.yaml
runtime-endpoint: unix:///run/containerd/containerd.sock
image-endpoint: unix:///run/containerd/containerd.sock
timeout: 2
pull-image-on-create: false

验证crictl

查看crictl版本

~# crictl version
Version:  0.1.0
RuntimeName:  containerd
RuntimeVersion:  v1.6.8
RuntimeApiVersion:  v1

查看images

~# crictl images
IMAGE               TAG                 IMAGE ID            SIZE

参考文档

https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/crictl.md

 

标签:run,default,image,unix,crictl,安装,more
From: https://www.cnblogs.com/wangguishe/p/16779227.html

相关文章

  • android开发apk安装失败对应的错误码以及原因
    android开发apk安装失败对应的错误码以及原因代码在PackageManager.java系统类里中文意思可参考:https://www.cnblogs.com/cwfsoft/p/11776094.html/***@hide 未知*......
  • eclipse 安装sts插件
    1、在线安装http://download.springsource.com/release/TOOLS/update/e4.16/a、查看eclise版本,把对应的版本修改下b、点击help-installnewsoftware,输入name和url,勾选......
  • EXSI生产服务器安装
    【厂商链接】联想:https://vmware.lenovo.com/content/custom_iso/【参考文档】【3】安装VMwarevSphereESXI做一次运维之VMwareESXI虚拟化联想服务器SR550(ThinkSys......
  • Windows / Mac 安装Typora(1.2.4版)
    TyporaTypora是一款支持实时预览的Markdown文本编辑器。附件下载:Typora附件Windows版本1.解压Typora_1.3.8_windows.rar文件 2.双击Setup.exe直接选择推荐的......
  • Nmap安装
     Nmap(NetworkMapper,网络映射器)是一款开放源代码的网络探测和安全审核工具。它被设计用来快速扫描大型网络,包括主机探测与发现、开放的端口情况、操作系统与应用服务指纹......
  • 永久配置 “国内镜像源”,安装东西,像做火箭一样,蹭就上去啦!妈妈再也不担心我学不到东西
    问题来源今天在使用pipinstallxlutils安装xlutils包的时候,一直出现了该错误ReadTimeoutError:HTTPSConnectionPool(host=‘files.pythonhosted.org’,port=443):Readt......
  • Android studio安装教程
    Androidstudio安装教程傻瓜式教程如果想要彻底重装Androidstudio可以删除目录C:\Users\用户名中的以下几个文件夹。.android.gradle.Androidstudio(Androidstud......
  • containerd 安装
    仓库安装root@wgs:~#aptupdateroot@wgs:~#apt-yinstallcontainerdroot@wgs:~#systemctlstatuscontainerd二进制安装安装containerd下载containerd下载地址......
  • 安装 Metrics server
    安装MetricsserverMetricsServer是Kubernetes内置自动缩放管道的可扩展、高效的容器资源指标来源。MetricsServer从Kubelets收集资源指标,并通过MetricsAPI在K......
  • 二进制安装Kubernetes(k8s)IPv4/IPv6双栈 v1.24.0
    二进制安装Kubernetes(k8s)v1.24.0IPv4/IPv6双栈介绍kubernetes二进制安装1.23.3和1.23.4和1.23.5和1.23.6和1.24.0 文档以及安装包已生成。后续尽可能第一时......