//容器和Sandbox运行时管理<br>RuntimeService<br>
// Version接口返回运行时名称,版本和API版本。<br> rpc Version(VersionRequest) returns (VersionResponse) {}
// RunPodSandbox接口创建并启动一个pod-level Sandbox. Runtimes 必须确保Sandbox成功处在Ready状态<br> rpc RunPodSandbox(RunPodSandboxRequest) returns (RunPodSandboxResponse) {}
// StopPodSandbox接口停止作为沙箱内部的任何正在运行的进程,并回收分配给沙箱的网络资源(例如,IP地址)。<br>//sandbox内的任何运行中的容器都必须被强制终止。这个请求是幂等,即使所有的相关资源已经被回收也不能返回错误,<br>//kubelet 将在RemovePodSandbox接口被调用前至少请求本接口一次。<br>//如果Sandbox变得非必须则相关资源将会第一时间被回收,因此,本接口预计会被请求多次。<br> rpc StopPodSandbox(StopPodSandboxRequest) returns (StopPodSandboxResponse) {}<br>
// RemovePodSandbox接口将删除任何正运行在sandbox中的容器,容器将被强制终止并删除<br>// 本接口是幂等哪怕sandbox已经被删除也不能返回错误。<br>rpc RemovePodSandbox(RemovePodSandboxRequest) returns (RemovePodSandboxResponse) {}
// PodSandboxStatus接口返回PodSandbox状态,指定的sandbox不存在则返回错误。<br>rpc PodSandboxStatus(PodSandboxStatusRequest) returns (PodSandboxStatusResponse) {}
// ListPodSandbox returns a list of PodSandboxes.<br>rpc ListPodSandbox(ListPodSandboxRequest) returns (ListPodSandboxResponse) {}
// CreateContainer creates a new container in specified PodSandbox<br>rpc CreateContainer(CreateContainerRequest) returns (CreateContainerResponse) {}
// StartContainer starts the container.<br>rpc StartContainer(StartContainerRequest) returns (StartContainerResponse) {}
// StopContainer stops a running container with a grace period (i.e., timeout).<br>// This call is idempotent, and must not return an error if the container has already been stopped.<br>// TODO: what must the runtime do after the grace period is reached?<br>rpc StopContainer(StopContainerRequest) returns (StopContainerResponse) {}
// RemoveContainer removes the container. If the container is running, the container must be forcibly removed.<br> // This call is idempotent, and must not return an error if the container has already been removed.<br> rpc RemoveContainer(RemoveContainerRequest) returns (RemoveContainerResponse) {}<br><br> // ListContainers lists all containers by filters.<br> rpc ListContainers(ListContainersRequest) returns (ListContainersResponse) {}<br><br> // ContainerStatus returns status of the container. If the container is not present, returns an error.<br> rpc ContainerStatus(ContainerStatusRequest) returns (ContainerStatusResponse) {}<br><br> // UpdateContainerResources updates ContainerConfig of the container.<br> rpc UpdateContainerResources(UpdateContainerResourcesRequest) returns (UpdateContainerResourcesResponse) {}<br><br> // ExecSync runs a command in a container synchronously.<br> rpc ExecSync(ExecSyncRequest) returns (ExecSyncResponse) {}<br><br> // Exec prepares a streaming endpoint to execute a command in the container.<br> rpc Exec(ExecRequest) returns (ExecResponse) {}<br><br> // Attach prepares a streaming endpoint to attach to a running container.<br> rpc Attach(AttachRequest) returns (AttachResponse) {}<br><br> // PortForward prepares a streaming endpoint to forward ports from a PodSandbox.<br> rpc PortForward(PortForwardRequest) returns (PortForwardResponse) {}<br><br> // ContainerStats returns stats of the container. If the container does not exist, the call returns an error.<br> rpc ContainerStats(ContainerStatsRequest) returns (ContainerStatsResponse) {}<br><br> // ListContainerStats returns stats of all running containers.<br> rpc ListContainerStats(ListContainerStatsRequest) returns (ListContainerStatsResponse) {}<br><br> // UpdateRuntimeConfig updates the runtime configuration based on the given request.<br> rpc UpdateRuntimeConfig(UpdateRuntimeConfigRequest) returns (UpdateRuntimeConfigResponse) {}<br><br> // Status returns the status of the runtime.<br> rpc Status(StatusRequest) returns (StatusResponse) {}<br>
//提供了从镜像仓库拉取、查看、和移除镜像的RPC。<br>ImageService<br>
// ListImages lists existing images.<br>rpc ListImages(ListImagesRequest) returns (ListImagesResponse) {}<br>
// ImageStatus returns the status of the image. If the image is not<br>// present, returns a response with ImageStatusResponse.Image set to nil.<br>rpc ImageStatus(ImageStatusRequest) returns (ImageStatusResponse) {}<br>
// PullImage pulls an image with authentication config.<br>rpc PullImage(PullImageRequest) returns (PullImageResponse) {}<br>
// RemoveImage removes the image.<br>// This call is idempotent, and must not return an error if the image has already been removed.<br>rpc RemoveImage(RemoveImageRequest) returns (RemoveImageResponse) {}<br>
// ImageFSInfo returns information of the filesystem that is used to store images.<br>rpc ImageFsInfo(ImageFsInfoRequest) returns (ImageFsInfoResponse) {}<br>