To regenerate api.pb.go run hack/protoc/protoc.sh gen_proto
ImageService defines the public APIs for managing images.
Method Name | Request Type | Response Type | Description |
ListImages | ListImagesRequest | ListImagesResponse | ListImages lists existing images. |
ImageStatus | ImageStatusRequest | ImageStatusResponse | ImageStatus returns the status of the image. If the image is not present, returns a response with ImageStatusResponse.Image set to nil. |
PullImage | PullImageRequest | PullImageResponse | PullImage pulls an image with authentication config. |
RemoveImage | RemoveImageRequest | RemoveImageResponse | RemoveImage removes the image. This call is idempotent, and must not return an error if the image has already been removed. |
ImageFsInfo | ImageFsInfoRequest | ImageFsInfoResponse | ImageFSInfo returns information of the filesystem that is used to store images. |
Runtime service defines the public APIs for remote container runtimes
Method Name | Request Type | Response Type | Description |
Version | VersionRequest | VersionResponse | Version returns the runtime name, runtime version, and runtime API version. |
RunPodSandbox | RunPodSandboxRequest | RunPodSandboxResponse | RunPodSandbox creates and starts a pod-level sandbox. Runtimes must ensure the sandbox is in the ready state on success. |
StopPodSandbox | StopPodSandboxRequest | StopPodSandboxResponse | StopPodSandbox stops any running process that is part of the sandbox and reclaims network resources (e.g., IP addresses) allocated to the sandbox. If there are any running containers in the sandbox, they must be forcibly terminated. This call is idempotent, and must not return an error if all relevant resources have already been reclaimed. kubelet will call StopPodSandbox at least once before calling RemovePodSandbox. It will also attempt to reclaim resources eagerly, as soon as a sandbox is not needed. Hence, multiple StopPodSandbox calls are expected. |
RemovePodSandbox | RemovePodSandboxRequest | RemovePodSandboxResponse | RemovePodSandbox removes the sandbox. If there are any running containers in the sandbox, they must be forcibly terminated and removed. This call is idempotent, and must not return an error if the sandbox has already been removed. |
PodSandboxStatus | PodSandboxStatusRequest | PodSandboxStatusResponse | PodSandboxStatus returns the status of the PodSandbox. If the PodSandbox is not present, returns an error. |
ListPodSandbox | ListPodSandboxRequest | ListPodSandboxResponse | ListPodSandbox returns a list of PodSandboxes. |
CreateContainer | CreateContainerRequest | CreateContainerResponse | CreateContainer creates a new container in specified PodSandbox |
StartContainer | StartContainerRequest | StartContainerResponse | StartContainer starts the container. |
StopContainer | StopContainerRequest | StopContainerResponse | StopContainer stops a running container with a grace period (i.e., timeout). This call is idempotent, and must not return an error if the container has already been stopped. TODO: what must the runtime do after the grace period is reached? |
RemoveContainer | RemoveContainerRequest | RemoveContainerResponse | RemoveContainer removes the container. If the container is running, the container must be forcibly removed. This call is idempotent, and must not return an error if the container has already been removed. |
ListContainers | ListContainersRequest | ListContainersResponse | ListContainers lists all containers by filters. |
ContainerStatus | ContainerStatusRequest | ContainerStatusResponse | ContainerStatus returns status of the container. If the container is not present, returns an error. |
UpdateContainerResources | UpdateContainerResourcesRequest | UpdateContainerResourcesResponse | UpdateContainerResources updates ContainerConfig of the container. |
ReopenContainerLog | ReopenContainerLogRequest | ReopenContainerLogResponse | ReopenContainerLog asks runtime to reopen the stdout/stderr log file for the container. This is often called after the log file has been rotated. If the container is not running, container runtime can choose to either create a new log file and return nil, or return an error. Once it returns error, new container log file MUST NOT be created. |
ExecSync | ExecSyncRequest | ExecSyncResponse | ExecSync runs a command in a container synchronously. |
Exec | ExecRequest | ExecResponse | Exec prepares a streaming endpoint to execute a command in the container. |
Attach | AttachRequest | AttachResponse | Attach prepares a streaming endpoint to attach to a running container. |
PortForward | PortForwardRequest | PortForwardResponse | PortForward prepares a streaming endpoint to forward ports from a PodSandbox. |
ContainerStats | ContainerStatsRequest | ContainerStatsResponse | ContainerStats returns stats of the container. If the container does not exist, the call returns an error. |
ListContainerStats | ListContainerStatsRequest | ListContainerStatsResponse | ListContainerStats returns stats of all running containers. |
UpdateRuntimeConfig | UpdateRuntimeConfigRequest | UpdateRuntimeConfigResponse | UpdateRuntimeConfig updates the runtime configuration based on the given request. |
Status | StatusRequest | StatusResponse | Status returns the status of the runtime. |
StartPodSandbox | StartPodSandboxRequest | StartPodSandboxResponse | StartPodSandbox restart a sandbox pod which was stopped by accident and we should reconfigure it with network plugin which will make sure it reacquire its original network configuration, like IP address. |
VolumeService defines the public APIs for managing volumes.
Method Name | Request Type | Response Type | Description |
RemoveVolume | RemoveVolumeRequest | RemoveVolumeResponse | RemoveVolume removes the volume. |
Field | Type | Label | Description |
container_id | string | ID of the container to which to attach. |
|
stdin | bool | Whether to stream stdin. One of `stdin`, `stdout`, and `stderr` MUST be true. |
|
tty | bool | Whether the process being attached is running in a TTY. This must match the TTY setting in the ContainerConfig. |
|
stdout | bool | Whether to stream stdout. One of `stdin`, `stdout`, and `stderr` MUST be true. |
|
stderr | bool | Whether to stream stderr. One of `stdin`, `stdout`, and `stderr` MUST be true. If `tty` is true, `stderr` MUST be false. Multiplexing is not supported in this case. The output of stdout and stderr will be combined to a single stream. |
Field | Type | Label | Description |
url | string | Fully qualified URL of the attach streaming server. |
AuthConfig contains authorization information for connecting to a registry.
Field | Type | Label | Description |
username | string |
|
|
password | string |
|
|
auth | string |
|
|
server_address | string |
|
|
identity_token | string | IdentityToken is used to authenticate the user and get an access token for the registry. |
|
registry_token | string | RegistryToken is a bearer token to be sent to a registry |
Capability contains the container capabilities to add or drop
Field | Type | Label | Description |
add_capabilities | string | repeated | List of capabilities to add. |
drop_capabilities | string | repeated | List of capabilities to drop. |
Container provides the runtime information for a container, such as ID, hash,
state of the container.
Field | Type | Label | Description |
id | string | ID of the container, used by the container runtime to identify a container. |
|
pod_sandbox_id | string | ID of the sandbox to which this container belongs. |
|
metadata | ContainerMetadata | Metadata of the container. |
|
image | ImageSpec | Spec of the image. |
|
image_ref | string | Reference to the image in use. For most runtimes, this should be an image ID. |
|
state | ContainerState | State of the container. |
|
created_at | int64 | Creation time of the container in nanoseconds. |
|
labels | Container.LabelsEntry | repeated | Key-value pairs that may be used to scope and select individual resources. |
annotations | Container.AnnotationsEntry | repeated | Unstructured key-value map holding arbitrary metadata. Annotations MUST NOT be altered by the runtime; the value of this field MUST be identical to that of the corresponding ContainerConfig used to instantiate this Container. |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
ContainerAttributes provides basic information of the container.
Field | Type | Label | Description |
id | string | ID of the container. |
|
metadata | ContainerMetadata | Metadata of the container. |
|
labels | ContainerAttributes.LabelsEntry | repeated | Key-value pairs that may be used to scope and select individual resources. |
annotations | ContainerAttributes.AnnotationsEntry | repeated | Unstructured key-value map holding arbitrary metadata. Annotations MUST NOT be altered by the runtime; the value of this field MUST be identical to that of the corresponding ContainerConfig used to instantiate the Container this status represents. |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
ContainerConfig holds all the required and optional fields for creating a
container.
Field | Type | Label | Description |
metadata | ContainerMetadata | Metadata of the container. This information will uniquely identify the container, and the runtime should leverage this to ensure correct operation. The runtime may also use this information to improve UX, such as by constructing a readable name. |
|
image | ImageSpec | Image to use. |
|
command | string | repeated | Command to execute (i.e., entrypoint for docker) |
args | string | repeated | Args for the Command (i.e., command for docker) |
working_dir | string | Current working directory of the command. |
|
envs | KeyValue | repeated | List of environment variable to set in the container. |
mounts | Mount | repeated | Mounts for the container. |
devices | Device | repeated | Devices for the container. |
labels | ContainerConfig.LabelsEntry | repeated | Key-value pairs that may be used to scope and select individual resources. Label keys are of the form: label-key ::= prefixed-name | name prefixed-name ::= prefix '/' name prefix ::= DNS_SUBDOMAIN name ::= DNS_LABEL |
annotations | ContainerConfig.AnnotationsEntry | repeated | Unstructured key-value map that may be used by the kubelet to store and retrieve arbitrary metadata. Annotations MUST NOT be altered by the runtime; the annotations stored here MUST be returned in the ContainerStatus associated with the container this ContainerConfig creates. In general, in order to preserve a well-defined interface between the kubelet and the container runtime, annotations SHOULD NOT influence runtime behaviour. |
log_path | string | Path relative to PodSandboxConfig.LogDirectory for container to store
the log (STDOUT and STDERR) on the host.
E.g.,
PodSandboxConfig.LogDirectory = `/var/log/pods/ |
|
stdin | bool | Variables for interactive containers, these have very specialized use-cases (e.g. debugging). TODO: Determine if we need to continue supporting these fields that are part of Kubernetes's Container Spec. |
|
stdin_once | bool |
|
|
tty | bool |
|
|
linux | LinuxContainerConfig | Configuration specific to Linux containers. |
|
windows | WindowsContainerConfig | Configuration specific to Windows containers. |
|
net_priority | int64 | NetPriority of the container |
|
quota_id | string | QuotaId of the container |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
ContainerFilter is used to filter containers.
All those fields are combined with 'AND'
Field | Type | Label | Description |
id | string | ID of the container. |
|
state | ContainerStateValue | State of the container. |
|
pod_sandbox_id | string | ID of the PodSandbox. |
|
label_selector | ContainerFilter.LabelSelectorEntry | repeated | LabelSelector to select matches. Only api.MatchLabels is supported for now and the requirements are ANDed. MatchExpressions is not supported yet. |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
ContainerMetadata holds all necessary information for building the container
name. The container runtime is encouraged to expose the metadata in its user
interface for better user experience. E.g., runtime can construct a unique
container name based on the metadata. Note that (name, attempt) is unique
within a sandbox for the entire lifetime of the sandbox.
Field | Type | Label | Description |
name | string | Name of the container. Same as the container name in the PodSpec. |
|
attempt | uint32 | Attempt number of creating the container. Default: 0. |
ContainerStateValue is the wrapper of ContainerState.
Field | Type | Label | Description |
state | ContainerState | State of the container. |
ContainerStats provides the resource usage statistics for a container.
Field | Type | Label | Description |
attributes | ContainerAttributes | Information of the container. |
|
cpu | CpuUsage | CPU usage gathered from the container. |
|
memory | MemoryUsage | Memory usage gathered from the container. |
|
writable_layer | FilesystemUsage | Usage of the writeable layer. |
ContainerStatsFilter is used to filter containers.
All those fields are combined with 'AND'
Field | Type | Label | Description |
id | string | ID of the container. |
|
pod_sandbox_id | string | ID of the PodSandbox. |
|
label_selector | ContainerStatsFilter.LabelSelectorEntry | repeated | LabelSelector to select matches. Only api.MatchLabels is supported for now and the requirements are ANDed. MatchExpressions is not supported yet. |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Field | Type | Label | Description |
container_id | string | ID of the container for which to retrieve stats. |
Field | Type | Label | Description |
stats | ContainerStats | Stats of the container. |
ContainerStatus represents the status of a container.
Field | Type | Label | Description |
id | string | ID of the container. |
|
metadata | ContainerMetadata | Metadata of the container. |
|
state | ContainerState | Status of the container. |
|
created_at | int64 | Creation time of the container in nanoseconds. |
|
started_at | int64 | Start time of the container in nanoseconds. Default: 0 (not specified). |
|
finished_at | int64 | Finish time of the container in nanoseconds. Default: 0 (not specified). |
|
exit_code | int32 | Exit code of the container. Only required when finished_at != 0. Default: 0. |
|
image | ImageSpec | Spec of the image. |
|
image_ref | string | Reference to the image in use. For most runtimes, this should be an image ID |
|
reason | string | Brief CamelCase string explaining why container is in its current state. |
|
message | string | Human-readable message indicating details about why container is in its current state. |
|
labels | ContainerStatus.LabelsEntry | repeated | Key-value pairs that may be used to scope and select individual resources. |
annotations | ContainerStatus.AnnotationsEntry | repeated | Unstructured key-value map holding arbitrary metadata. Annotations MUST NOT be altered by the runtime; the value of this field MUST be identical to that of the corresponding ContainerConfig used to instantiate the Container this status represents. |
mounts | Mount | repeated | Mounts for the container. |
log_path | string | Log path of container. |
|
volumes | ContainerStatus.VolumesEntry | repeated | Volumes of container |
resources | LinuxContainerResources | Resources specification for the container |
|
quota_id | string | QuotaId of the container |
|
envs | KeyValue | repeated | List of environment variable to set in the container. |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Field | Type | Label | Description |
key | string |
|
|
value | Volume |
|
Field | Type | Label | Description |
container_id | string | ID of the container for which to retrieve status. |
|
verbose | bool | Verbose indicates whether to return extra information about the container. |
Field | Type | Label | Description |
status | ContainerStatus | Status of the container. |
|
info | ContainerStatusResponse.InfoEntry | repeated | Info is extra information of the Container. The key could be arbitrary string, and value should be in json format. The information could include anything useful for debug, e.g. pid for linux container based container runtime. It should only be returned non-empty when Verbose is true. |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
CpuUsage provides the CPU usage information.
Field | Type | Label | Description |
timestamp | int64 | Timestamp in nanoseconds at which the information were collected. Must be > 0. |
|
usage_core_nano_seconds | UInt64Value | Cumulative CPU usage (sum across all cores) since object creation. |
Field | Type | Label | Description |
pod_sandbox_id | string | ID of the PodSandbox in which the container should be created. |
|
config | ContainerConfig | Config of the container. |
|
sandbox_config | PodSandboxConfig | Config of the PodSandbox. This is the same config that was passed to RunPodSandboxRequest to create the PodSandbox. It is passed again here just for easy reference. The PodSandboxConfig is immutable and remains the same throughout the lifetime of the pod. |
Field | Type | Label | Description |
container_id | string | ID of the created container. |
DNSConfig specifies the DNS servers and search domains of a sandbox.
Field | Type | Label | Description |
servers | string | repeated | List of DNS servers of the cluster. |
searches | string | repeated | List of DNS search domains of the cluster. |
options | string | repeated | List of DNS options. See https://linux.die.net/man/5/resolv.conf for all available options. |
Device specifies a host device to mount into a container.
Field | Type | Label | Description |
container_path | string | Path of the device within the container. |
|
host_path | string | Path of the device on the host. |
|
permissions | string | Cgroups permissions of the device, candidates are one or more of * r - allows container to read from the specified device. * w - allows container to write to the specified device. * m - allows container to create device files that do not yet exist. |
Field | Type | Label | Description |
container_id | string | ID of the container in which to execute the command. |
|
cmd | string | repeated | Command to execute. |
tty | bool | Whether to exec the command in a TTY. |
|
stdin | bool | Whether to stream stdin. One of `stdin`, `stdout`, and `stderr` MUST be true. |
|
stdout | bool | Whether to stream stdout. One of `stdin`, `stdout`, and `stderr` MUST be true. |
|
stderr | bool | Whether to stream stderr. One of `stdin`, `stdout`, and `stderr` MUST be true. If `tty` is true, `stderr` MUST be false. Multiplexing is not supported in this case. The output of stdout and stderr will be combined to a single stream. |
Field | Type | Label | Description |
url | string | Fully qualified URL of the exec streaming server. |
Field | Type | Label | Description |
container_id | string | ID of the container. |
|
cmd | string | repeated | Command to execute. |
timeout | int64 | Timeout in seconds to stop the command. Default: 0 (run forever). |
Field | Type | Label | Description |
stdout | bytes | Captured command stdout output. |
|
stderr | bytes | Captured command stderr output. |
|
exit_code | int32 | Exit code the command finished with. Default: 0 (success). |
FilesystemIdentifier uniquely identify the filesystem.
Field | Type | Label | Description |
mountpoint | string | Mountpoint of a filesystem. |
FilesystemUsage provides the filesystem usage information.
Field | Type | Label | Description |
timestamp | int64 | Timestamp in nanoseconds at which the information were collected. Must be > 0. |
|
fs_id | FilesystemIdentifier | The unique identifier of the filesystem. |
|
used_bytes | UInt64Value | UsedBytes represents the bytes used for images on the filesystem. This may differ from the total bytes used on the filesystem and may not equal CapacityBytes - AvailableBytes. |
|
inodes_used | UInt64Value | InodesUsed represents the inodes used by the images. This may not equal InodesCapacity - InodesAvailable because the underlying filesystem may also be used for purposes other than storing images. |
Basic information about a container image.
Field | Type | Label | Description |
id | string | ID of the image. |
|
repo_tags | string | repeated | Other names by which this image is known. |
repo_digests | string | repeated | Digests by which this image is known. |
size | uint64 | Size of the image in bytes. Must be > 0. |
|
uid | Int64Value | UID that will run the command(s). This is used as a default if no user is specified when creating the container. UID and the following user name are mutually exclusive. |
|
username | string | User name that will run the command(s). This is used if UID is not set and no user is specified when creating container. |
|
volumes | Image.VolumesEntry | repeated | Volumes of image |
Field | Type | Label | Description |
key | string |
|
|
value | Volume |
|
Field | Type | Label | Description |
image | ImageSpec | Spec of the image. |
Field | Type | Label | Description |
image_filesystems | FilesystemUsage | repeated | Information of image filesystem(s). |
ImageSpec is an internal representation of an image. Currently, it wraps the
value of a Container's Image field (e.g. imageID or imageDigest), but in the
future it will include more detailed information about the different image types.
Field | Type | Label | Description |
image | string |
|
Field | Type | Label | Description |
image | ImageSpec | Spec of the image. |
|
verbose | bool | Verbose indicates whether to return extra information about the image. |
Field | Type | Label | Description |
image | Image | Status of the image. |
|
info | ImageStatusResponse.InfoEntry | repeated | Info is extra information of the Image. The key could be arbitrary string, and value should be in json format. The information could include anything useful for debug, e.g. image config for oci image based container runtime. It should only be returned non-empty when Verbose is true. |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Int64Value is the wrapper of int64.
Field | Type | Label | Description |
value | int64 | The value. |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
LinuxContainerConfig contains platform-specific configuration for
Linux-based containers.
Field | Type | Label | Description |
resources | LinuxContainerResources | Resources specification for the container. |
|
security_context | LinuxContainerSecurityContext | LinuxContainerSecurityContext configuration for the container. |
LinuxContainerResources specifies Linux specific configuration for
resources.
TODO: Consider using Resources from opencontainers/runtime-spec/specs-go
directly.
Field | Type | Label | Description |
cpu_period | int64 | CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified). |
|
cpu_quota | int64 | CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified). |
|
cpu_shares | int64 | CPU shares (relative weight vs. other containers). Default: 0 (not specified). |
|
memory_limit_in_bytes | int64 | Memory limit in bytes. Default: 0 (not specified). |
|
oom_score_adj | int64 | OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified). |
|
cpuset_cpus | string | CpusetCpus constrains the allowed set of logical CPUs. Default: "" (not specified). |
|
cpuset_mems | string | CpusetMems constrains the allowed set of memory nodes. Default: "" (not specified). |
|
disk_quota | LinuxContainerResources.DiskQuotaEntry | repeated | DiskQuota constrains the disk |
blkio_weight | uint32 | Block IO weight (relative weight vs. other containers) |
|
blkio_weight_device | WeightDevice | repeated |
|
blkio_device_read_bps | ThrottleDevice | repeated |
|
blkio_device_write_bps | ThrottleDevice | repeated |
|
blkio_device_read_IOps | ThrottleDevice | repeated |
|
blkio_device_write_IOps | ThrottleDevice | repeated |
|
kernel_memory | int64 | Kernel memory limit (in bytes) |
|
memory_reservation | int64 | Memory soft limit (in bytes) |
|
memory_swappiness | Int64Value | Tuning container memory swappiness behaviour |
|
ulimits | Ulimit | repeated | List of ulimits to be set in the container |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
LinuxContainerSecurityContext holds linux security configuration that will be applied to a container.
Field | Type | Label | Description |
capabilities | Capability | Capabilities to add or drop. |
|
privileged | bool | If set, run container in privileged mode. Privileged mode is incompatible with the following options. If privileged is set, the following features MAY have no effect: 1. capabilities 2. selinux_options 4. seccomp 5. apparmor Privileged mode implies the following specific options are applied: 1. All capabilities are added. 2. Sensitive paths, such as kernel module paths within sysfs, are not masked. 3. Any sysfs and procfs mounts are mounted RW. 4. Apparmor confinement is not applied. 5. Seccomp restrictions are not applied. 6. The device cgroup does not restrict access to any devices. 7. All devices from the host's /dev are available within the container. 8. SELinux restrictions are not applied (e.g. label=disabled). |
|
namespace_options | NamespaceOption | Configurations for the container's namespaces. Only used if the container uses namespace for isolation. |
|
selinux_options | SELinuxOption | SELinux context to be optionally applied. |
|
run_as_user | Int64Value | UID to run the container process as. Only one of run_as_user and run_as_username can be specified at a time. |
|
run_as_group | Int64Value | GID to run the container process as. run_as_group should only be specified when run_as_user or run_as_username is specified; otherwise, the runtime MUST error. |
|
run_as_username | string | User name to run the container process as. If specified, the user MUST exist in the container image (i.e. in the /etc/passwd inside the image), and be resolved there by the runtime; otherwise, the runtime MUST error. |
|
readonly_rootfs | bool | If set, the root filesystem of the container is read-only. |
|
supplemental_groups | int64 | repeated | List of groups applied to the first process run in the container, in addition to the container's primary GID. |
apparmor_profile | string | AppArmor profile for the container, candidate values are:
* runtime/default: equivalent to not specifying a profile.
* unconfined: no profiles are loaded
* localhost/ |
|
seccomp_profile_path | string | Seccomp profile for the container, candidate values are:
* runtime/default: the default profile for the container runtime
* unconfined: unconfined profile, ie, no seccomp sandboxing
* localhost/ |
|
no_new_privs | bool | no_new_privs defines if the flag for no_new_privs should be set on the container. |
LinuxPodSandboxConfig holds platform-specific configurations for Linux
host platforms and Linux-based containers.
Field | Type | Label | Description |
cgroup_parent | string | Parent cgroup of the PodSandbox. The cgroupfs style syntax will be used, but the container runtime can convert it to systemd semantics if needed. |
|
security_context | LinuxSandboxSecurityContext | LinuxSandboxSecurityContext holds sandbox security attributes. |
|
sysctls | LinuxPodSandboxConfig.SysctlsEntry | repeated | Sysctls holds linux sysctls config for the sandbox. |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
LinuxSandboxStatus contains status specific to Linux sandboxes.
Field | Type | Label | Description |
namespaces | Namespace | Paths to the sandbox's namespaces. |
LinuxSandboxSecurityContext holds linux security configuration that will be
applied to a sandbox. Note that:
1) It does not apply to containers in the pods.
2) It may not be applicable to a PodSandbox which does not contain any running
process.
Field | Type | Label | Description |
namespace_options | NamespaceOption | Configurations for the sandbox's namespaces. This will be used only if the PodSandbox uses namespace for isolation. |
|
selinux_options | SELinuxOption | Optional SELinux context to be applied. |
|
run_as_user | Int64Value | UID to run sandbox processes as, when applicable. |
|
run_as_group | Int64Value | GID to run sandbox processes as, when applicable. run_as_group should only be specified when run_as_user is specified; otherwise, the runtime MUST error. |
|
readonly_rootfs | bool | If set, the root filesystem of the sandbox is read-only. |
|
supplemental_groups | int64 | repeated | List of groups applied to the first process run in the sandbox, in addition to the sandbox's primary GID. |
privileged | bool | Indicates whether the sandbox will be asked to run a privileged container. If a privileged container is to be executed within it, this MUST be true. This allows a sandbox to take additional security precautions if no privileged containers are expected to be run. |
|
seccomp_profile_path | string | Seccomp profile for the sandbox, candidate values are:
* runtime/default: the default profile for the container runtime
* unconfined: unconfined profile, ie, no seccomp sandboxing
* localhost/ |
Field | Type | Label | Description |
filter | ContainerStatsFilter | Filter for the list request. |
Field | Type | Label | Description |
stats | ContainerStats | repeated | Stats of the container. |
Field | Type | Label | Description |
filter | ContainerFilter |
|
Field | Type | Label | Description |
containers | Container | repeated | List of containers. |
Field | Type | Label | Description |
filter | ImageFilter | Filter to list images. |
Field | Type | Label | Description |
images | Image | repeated | List of images. |
Field | Type | Label | Description |
filter | PodSandboxFilter | PodSandboxFilter to filter a list of PodSandboxes. |
Field | Type | Label | Description |
items | PodSandbox | repeated | List of PodSandboxes. |
MemoryUsage provides the memory usage information.
Field | Type | Label | Description |
timestamp | int64 | Timestamp in nanoseconds at which the information were collected. Must be > 0. |
|
working_set_bytes | UInt64Value | The amount of working set memory in bytes. |
Mount specifies a host volume to mount into a container.
Field | Type | Label | Description |
container_path | string | Path of the mount within the container. |
|
host_path | string | Path of the mount on the host. If the hostPath doesn't exist, then runtimes should report error. If the hostpath is a symbolic link, runtimes should follow the symlink and mount the real destination to container. |
|
readonly | bool | If set, the mount is read-only. |
|
selinux_relabel | bool | If set, the mount needs SELinux relabeling. |
|
propagation | MountPropagation | Requested propagation mode. |
|
name | string | Name of volume |
Namespace contains paths to the namespaces.
Field | Type | Label | Description |
options | NamespaceOption | Namespace options for Linux namespaces. |
NamespaceOption provides options for Linux namespaces.
Field | Type | Label | Description |
network | NamespaceMode | Network namespace for this container/sandbox. Note: There is currently no way to set CONTAINER scoped network in the Kubernetes API. Namespaces currently set by the kubelet: POD, NODE |
|
pid | NamespaceMode | PID namespace for this container/sandbox. Note: The CRI default is POD, but the v1.PodSpec default is CONTAINER. The kubelet's runtime manager will set this to CONTAINER explicitly for v1 pods. Namespaces currently set by the kubelet: POD, CONTAINER, NODE |
|
ipc | NamespaceMode | IPC namespace for this container/sandbox. Note: There is currently no way to set CONTAINER scoped IPC in the Kubernetes API. Namespaces currently set by the kubelet: POD, NODE |
Field | Type | Label | Description |
pod_cidr | string | CIDR to use for pod IP addresses. If the CIDR is empty, runtimes should omit it. |
PodSandbox contains minimal information about a sandbox.
Field | Type | Label | Description |
id | string | ID of the PodSandbox. |
|
metadata | PodSandboxMetadata | Metadata of the PodSandbox. |
|
state | PodSandboxState | State of the PodSandbox. |
|
created_at | int64 | Creation timestamps of the PodSandbox in nanoseconds. Must be > 0. |
|
labels | PodSandbox.LabelsEntry | repeated | Labels of the PodSandbox. |
annotations | PodSandbox.AnnotationsEntry | repeated | Unstructured key-value map holding arbitrary metadata. Annotations MUST NOT be altered by the runtime; the value of this field MUST be identical to that of the corresponding PodSandboxConfig used to instantiate this PodSandbox. |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
PodSandboxConfig holds all the required and optional fields for creating a
sandbox.
Field | Type | Label | Description |
metadata | PodSandboxMetadata | Metadata of the sandbox. This information will uniquely identify the sandbox, and the runtime should leverage this to ensure correct operation. The runtime may also use this information to improve UX, such as by constructing a readable name. |
|
hostname | string | Hostname of the sandbox. |
|
log_directory | string | Path to the directory on the host in which container log files are
stored.
By default the log of a container going into the LogDirectory will be
hooked up to STDOUT and STDERR. However, the LogDirectory may contain
binary log files with structured logging data from the individual
containers. For example, the files might be newline separated JSON
structured logs, systemd-journald journal files, gRPC trace files, etc.
E.g.,
PodSandboxConfig.LogDirectory = `/var/log/pods/ |
|
dns_config | DNSConfig | DNS config for the sandbox. |
|
port_mappings | PortMapping | repeated | Port mappings for the sandbox. |
labels | PodSandboxConfig.LabelsEntry | repeated | Key-value pairs that may be used to scope and select individual resources. |
annotations | PodSandboxConfig.AnnotationsEntry | repeated | Unstructured key-value map that may be set by the kubelet to store and retrieve arbitrary metadata. This will include any annotations set on a pod through the Kubernetes API. Annotations MUST NOT be altered by the runtime; the annotations stored here MUST be returned in the PodSandboxStatus associated with the pod this PodSandboxConfig creates. In general, in order to preserve a well-defined interface between the kubelet and the container runtime, annotations SHOULD NOT influence runtime behaviour. Annotations can also be useful for runtime authors to experiment with new features that are opaque to the Kubernetes APIs (both user-facing and the CRI). Whenever possible, however, runtime authors SHOULD consider proposing new typed fields for any new features instead. |
linux | LinuxPodSandboxConfig | Optional configurations specific to Linux hosts. |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
PodSandboxFilter is used to filter a list of PodSandboxes.
All those fields are combined with 'AND'
Field | Type | Label | Description |
id | string | ID of the sandbox. |
|
state | PodSandboxStateValue | State of the sandbox. |
|
label_selector | PodSandboxFilter.LabelSelectorEntry | repeated | LabelSelector to select matches. Only api.MatchLabels is supported for now and the requirements are ANDed. MatchExpressions is not supported yet. |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
PodSandboxMetadata holds all necessary information for building the sandbox name.
The container runtime is encouraged to expose the metadata associated with the
PodSandbox in its user interface for better user experience. For example,
the runtime can construct a unique PodSandboxName based on the metadata.
Field | Type | Label | Description |
name | string | Pod name of the sandbox. Same as the pod name in the PodSpec. |
|
uid | string | Pod UID of the sandbox. Same as the pod UID in the PodSpec. |
|
namespace | string | Pod namespace of the sandbox. Same as the pod namespace in the PodSpec. |
|
attempt | uint32 | Attempt number of creating the sandbox. Default: 0. |
PodSandboxNetworkStatus is the status of the network for a PodSandbox.
Field | Type | Label | Description |
ip | string | IP address of the PodSandbox. |
PodSandboxStateValue is the wrapper of PodSandboxState.
Field | Type | Label | Description |
state | PodSandboxState | State of the sandbox. |
PodSandboxStatus contains the status of the PodSandbox.
Field | Type | Label | Description |
id | string | ID of the sandbox. |
|
metadata | PodSandboxMetadata | Metadata of the sandbox. |
|
state | PodSandboxState | State of the sandbox. |
|
created_at | int64 | Creation timestamp of the sandbox in nanoseconds. Must be > 0. |
|
network | PodSandboxNetworkStatus | Network contains network status if network is handled by the runtime. |
|
linux | LinuxPodSandboxStatus | Linux-specific status to a pod sandbox. |
|
labels | PodSandboxStatus.LabelsEntry | repeated | Labels are key-value pairs that may be used to scope and select individual resources. |
annotations | PodSandboxStatus.AnnotationsEntry | repeated | Unstructured key-value map holding arbitrary metadata. Annotations MUST NOT be altered by the runtime; the value of this field MUST be identical to that of the corresponding PodSandboxConfig used to instantiate the pod sandbox this status represents. |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Field | Type | Label | Description |
pod_sandbox_id | string | ID of the PodSandbox for which to retrieve status. |
|
verbose | bool | Verbose indicates whether to return extra information about the pod sandbox. |
Field | Type | Label | Description |
status | PodSandboxStatus | Status of the PodSandbox. |
|
info | PodSandboxStatusResponse.InfoEntry | repeated | Info is extra information of the PodSandbox. The key could be arbitrary string, and value should be in json format. The information could include anything useful for debug, e.g. network namespace for linux container based container runtime. It should only be returned non-empty when Verbose is true. |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Field | Type | Label | Description |
pod_sandbox_id | string | ID of the container to which to forward the port. |
|
port | int32 | repeated | Port to forward. |
Field | Type | Label | Description |
url | string | Fully qualified URL of the port-forward streaming server. |
PortMapping specifies the port mapping configurations of a sandbox.
Field | Type | Label | Description |
protocol | Protocol | Protocol of the port mapping. |
|
container_port | int32 | Port number within the container. Default: 0 (not specified). |
|
host_port | int32 | Port number on the host. Default: 0 (not specified). |
|
host_ip | string | Host IP. |
Field | Type | Label | Description |
image | ImageSpec | Spec of the image. |
|
auth | AuthConfig | Authentication configuration for pulling the image. |
|
sandbox_config | PodSandboxConfig | Config of the PodSandbox, which is used to pull image in PodSandbox context. |
Field | Type | Label | Description |
image_ref | string | Reference to the image in use. For most runtimes, this should be an image ID or digest. |
Field | Type | Label | Description |
container_id | string | ID of the container to remove. |
Field | Type | Label | Description |
image | ImageSpec | Spec of the image to remove. |
Field | Type | Label | Description |
pod_sandbox_id | string | ID of the PodSandbox to remove. |
Field | Type | Label | Description |
volume_name | string | Name of the volume to remove |
Field | Type | Label | Description |
container_id | string | ID of the container for which to reopen the log. |
Field | Type | Label | Description |
config | PodSandboxConfig | Configuration for creating a PodSandbox. |
Field | Type | Label | Description |
pod_sandbox_id | string | ID of the PodSandbox to run. |
RuntimeCondition contains condition information for the runtime.
There are 2 kinds of runtime conditions:
1. Required conditions: Conditions are required for kubelet to work
properly. If any required condition is unmet, the node will be not ready.
The required conditions include:
* RuntimeReady: RuntimeReady means the runtime is up and ready to accept
basic containers e.g. container only needs host network.
* NetworkReady: NetworkReady means the runtime network is up and ready to
accept containers which require container network.
2. Optional conditions: Conditions are informative to the user, but kubelet
will not rely on. Since condition type is an arbitrary string, all conditions
not required are optional. These conditions will be exposed to users to help
them understand the status of the system.
Field | Type | Label | Description |
type | string | Type of runtime condition. |
|
status | bool | Status of the condition, one of true/false. Default: false. |
|
reason | string | Brief CamelCase string containing reason for the condition's last transition. |
|
message | string | Human-readable message indicating details about last transition. |
Field | Type | Label | Description |
network_config | NetworkConfig |
|
RuntimeStatus is information about the current status of the runtime.
Field | Type | Label | Description |
conditions | RuntimeCondition | repeated | List of current observed runtime conditions. |
SELinuxOption are the labels to be applied to the container.
Field | Type | Label | Description |
user | string |
|
|
role | string |
|
|
type | string |
|
|
level | string |
|
Field | Type | Label | Description |
container_id | string | ID of the container to start. |
Field | Type | Label | Description |
pod_sandbox_id | string | ID of the PodSandbox to start. |
Field | Type | Label | Description |
verbose | bool | Verbose indicates whether to return extra information about the runtime. |
Field | Type | Label | Description |
status | RuntimeStatus | Status of the Runtime. |
|
info | StatusResponse.InfoEntry | repeated | Info is extra information of the Runtime. The key could be arbitrary string, and value should be in json format. The information could include anything useful for debug, e.g. plugins used by the container runtime. It should only be returned non-empty when Verbose is true. |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Field | Type | Label | Description |
container_id | string | ID of the container to stop. |
|
timeout | int64 | Timeout in seconds to wait for the container to stop before forcibly terminating it. Default: 0 (forcibly terminate the container immediately) |
Field | Type | Label | Description |
pod_sandbox_id | string | ID of the PodSandbox to stop. |
ThrottleDevice is a structure that holds device:rate_per_second pair
Field | Type | Label | Description |
path | string | Path of throttledevice. |
|
rate | uint64 | Rate of throttledevice. |
UInt64Value is the wrapper of uint64.
Field | Type | Label | Description |
value | uint64 | The value. |
Ulimit is a human friendly version of Rlimit.
Field | Type | Label | Description |
name | string | Name of ulimit. |
|
hard | int64 | Hard limit of ulimit. |
|
soft | int64 | Soft limit of Ulimit. |
Field | Type | Label | Description |
container_id | string | ID of the container to update. |
|
linux | LinuxContainerResources | Resource configuration specific to Linux containers. |
Field | Type | Label | Description |
runtime_config | RuntimeConfig |
|
Field | Type | Label | Description |
version | string | Version of the kubelet runtime API. |
Field | Type | Label | Description |
version | string | Version of the kubelet runtime API. |
|
runtime_name | string | Name of the container runtime. |
|
runtime_version | string | Version of the container runtime. The string must be semver-compatible. |
|
runtime_api_version | string | API version of the container runtime. The string must be semver-compatible. |
WeightDevice is a structure that holds device:weight pair
Field | Type | Label | Description |
path | string | Path of weightdevice. |
|
Weight | uint32 | Weight of weightdevice. |
WindowsContainerConfig contains platform-specific configuration for
Windows-based containers.
Field | Type | Label | Description |
resources | WindowsContainerResources | Resources specification for the container. |
WindowsContainerResources specifies Windows specific configuration for
resources.
Field | Type | Label | Description |
cpu_shares | int64 | CPU shares (relative weight vs. other containers). Default: 0 (not specified). |
|
cpu_count | int64 | Number of CPUs available to the container. Default: 0 (not specified). |
|
cpu_maximum | int64 | Specifies the portion of processor cycles that this container can use as a percentage times 100. |
|
memory_limit_in_bytes | int64 | Memory limit in bytes. Default: 0 (not specified). |
Name | Number | Description |
CONTAINER_CREATED | 0 | |
CONTAINER_RUNNING | 1 | |
CONTAINER_EXITED | 2 | |
CONTAINER_UNKNOWN | 3 |
Name | Number | Description |
PROPAGATION_PRIVATE | 0 | No mount propagation ("private" in Linux terminology). |
PROPAGATION_HOST_TO_CONTAINER | 1 | Mounts get propagated from the host to the container ("rslave" in Linux). |
PROPAGATION_BIDIRECTIONAL | 2 | Mounts get propagated from the host to the container and from the container to the host ("rshared" in Linux). |
A NamespaceMode describes the intended namespace configuration for each
of the namespaces (Network, PID, IPC) in NamespaceOption. Runtimes should
map these modes as appropriate for the technology underlying the runtime.
Name | Number | Description |
POD | 0 | A POD namespace is common to all containers in a pod. For example, a container with a PID namespace of POD expects to view all of the processes in all of the containers in the pod. |
CONTAINER | 1 | A CONTAINER namespace is restricted to a single container. For example, a container with a PID namespace of CONTAINER expects to view only the processes in that container. |
NODE | 2 | A NODE namespace is the namespace of the Kubernetes node. For example, a container with a PID namespace of NODE expects to view all of the processes on the host running the kubelet. |
Name | Number | Description |
SANDBOX_READY | 0 | |
SANDBOX_NOTREADY | 1 |
Name | Number | Description |
TCP | 0 | |
UDP | 1 |
.proto Type | Notes | C++ Type | Java Type | Python Type |
double | double | double | float | |
float | float | float | float | |
int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int |
int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long |
uint32 | Uses variable-length encoding. | uint32 | int | int/long |
uint64 | Uses variable-length encoding. | uint64 | long | int/long |
sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int |
sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long |
fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int |
fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long |
sfixed32 | Always four bytes. | int32 | int | int |
sfixed64 | Always eight bytes. | int64 | long | int/long |
bool | bool | boolean | boolean | |
string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode |
bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |