diff options
| author | David Hovey <david@hoveytech.com> | 2019-09-25 16:48:08 -0700 |
|---|---|---|
| committer | David Hovey <david@hoveytech.com> | 2019-09-25 16:48:08 -0700 |
| commit | 72c7370548a65efcea9a9ba57c59cd10fa6e7530 (patch) | |
| tree | f549d6eb1ea92ea3eb11c062c4aa5c485206c567 /contributors/devel/sig-node | |
| parent | 1250c9771e9a5f0cb6aab40e746612d5c5a670bb (diff) | |
| parent | 0b070cdc882e6b8f38aae95fcf4c18a983a61f36 (diff) | |
Merge branch 'master' of github.com:kubernetes/community
Diffstat (limited to 'contributors/devel/sig-node')
| -rw-r--r-- | contributors/devel/sig-node/container-runtime-interface.md | 24 | ||||
| -rw-r--r-- | contributors/devel/sig-node/cri-container-stats.md | 11 | ||||
| -rw-r--r-- | contributors/devel/sig-node/e2e-node-tests.md | 24 |
3 files changed, 43 insertions, 16 deletions
diff --git a/contributors/devel/sig-node/container-runtime-interface.md b/contributors/devel/sig-node/container-runtime-interface.md index 84dcddde..3941c942 100644 --- a/contributors/devel/sig-node/container-runtime-interface.md +++ b/contributors/devel/sig-node/container-runtime-interface.md @@ -3,10 +3,12 @@ ## What is CRI? CRI (_Container Runtime Interface_) consists of a -[protobuf API](https://git.k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2/api.proto), specifications/requirements (to-be-added), +[protobuf API](https://git.k8s.io/kubernetes/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.proto), and [libraries](https://git.k8s.io/kubernetes/pkg/kubelet/server/streaming) -for container runtimes to integrate with kubelet on a node. CRI is currently in Alpha. +for container runtimes to integrate with kubelet on a node. The CRI API is +currently in Alpha, and the CRI-Docker integration is used by default as of +Kubernetes 1.7+. In the future, we plan to add more developer tools such as the CRI validation tests. @@ -26,14 +28,7 @@ pluggable container runtimes and build a healthier ecosystem. ## How to use CRI? -For Kubernetes 1.6+: - -1. Start the image and runtime services on your node. You can have a single - service acting as both image and runtime services. -2. Set the kubelet flags - - Pass the unix socket(s) to which your services listen to kubelet: - `--container-runtime-endpoint` and `--image-service-endpoint`. - - Use the "remote" runtime by `--container-runtime=remote`. +See the [CRI installation documentation](https://kubernetes.io/docs/setup/cri/). CRI is still young and we are actively incorporating feedback from developers to improve the API. Although we strive to maintain backward compatibility, @@ -54,7 +49,6 @@ The old, pre-CRI Docker integration was removed in 1.7. The Kubernetes 1.5 [blog post on CRI](https://kubernetes.io/blog/2016/12/container-runtime-interface-cri-in-kubernetes/) serves as a general introduction. - Below is a mixed list of CRI specifications/requirements, design docs and proposals. We are working on adding more documentation for the API. @@ -74,7 +68,7 @@ proposals. We are working on adding more documentation for the API. ## [Status update](#status-update) ### Kubernetes v1.7 release (Docker-CRI integration GA, container metrics API) - - The Docker CRI integration has been promoted to GA. + - The Docker CRI integration has been promoted to GA. - The legacy, non-CRI Docker integration has been completely removed from Kubelet. The deprecated `--enable-cri` flag has been removed. - CRI has been extended to support collecting container metrics from the @@ -104,6 +98,9 @@ default in Kubelet**. #### [CRI known issues](#cri-1.5-known-issues): +Note, these are known issues as of the 1.5 release. They may or may not have +been fixed since. + - [#27097](https://github.com/kubernetes/kubernetes/issues/27097): Container metrics are not yet defined in CRI. - [#36401](https://github.com/kubernetes/kubernetes/issues/36401): The new @@ -118,6 +115,9 @@ default in Kubelet**. #### [Docker CRI integration known issues](#docker-cri-1.5-known-issues) +Note, these are known issues as of the 1.5 release. They may or may not have +been fixed since. + - Docker compatibility: Support only Docker v1.11 and v1.12. - Network: - [#35457](https://github.com/kubernetes/kubernetes/issues/35457): Does diff --git a/contributors/devel/sig-node/cri-container-stats.md b/contributors/devel/sig-node/cri-container-stats.md index c72f2c8b..a760d404 100644 --- a/contributors/devel/sig-node/cri-container-stats.md +++ b/contributors/devel/sig-node/cri-container-stats.md @@ -115,7 +115,10 @@ behind it.* ## Status -The container metrics calls are added to CRI in Kubernetes 1.7, but Kubelet does not -yet use it to gather metrics from the runtime. We plan to enable Kubelet to -optionally consume the container metrics from the API in 1.8. - +The container metrics calls were added to CRI in Kubernetes 1.7, but Kubelet did not +yet use it to gather metrics from the runtime. In Kubernetes 1.8, Kubelet was +given the option to [consume the container metrics using CRI +stats](https://github.com/kubernetes/kubernetes/pull/51557). See the +`pkg/kubelet/cadvisor.go#UsingLegacyCadvisorStats` +[function](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/cadvisor/util.go#L73) +for more information on how Kubelet determines the proper metrics source. diff --git a/contributors/devel/sig-node/e2e-node-tests.md b/contributors/devel/sig-node/e2e-node-tests.md index 4f3327cb..31c0459c 100644 --- a/contributors/devel/sig-node/e2e-node-tests.md +++ b/contributors/devel/sig-node/e2e-node-tests.md @@ -148,6 +148,30 @@ test in parallel against different instances of the same image. make test-e2e-node REMOTE=true INSTANCE_PREFIX="my-prefix" ``` +## Run tests using a custom image config + +This is useful if you want to test out different runtime configurations. First, make a local +(temporary) copy of the base image config from the test-infra repo: +https://github.com/kubernetes/test-infra/tree/master/jobs/e2e_node + +Make your desired modifications to the config, and update data paths to be absolute paths to the +relevant files on your local machine (e.g. prepend your home directory path to each). For example: + +```diff + images: + cos-stable: + image_regex: cos-stable-60-9592-84-0 + project: cos-cloud +- metadata: "user-data</go/src/github.com/containerd/cri/test/e2e_node/init.yaml,containerd-configure-sh</go/src/github.com/containerd/cri/cluster/gce/configure.sh,containerd-extra-init-sh</go/src/github.com/containerd/cri/test/e2e_node/gci-init.sh,containerd-env</workspace/test-infra/jobs/e2e_node/containerd/cri-master/env,gci-update-strategy=update_disabled" ++ metadata: "user-data</home/tallclair/go/src/github.com/containerd/cri/test/e2e_node/init.yaml,containerd-configure-sh</home/tallclair/go/src/github.com/containerd/cri/cluster/gce/configure.sh,containerd-extra-init-sh</home/tallclair/go/src/github.com/containerd/cri/test/e2e_node/gci-init.sh,containerd-env</home/tallclair/workspace/test-infra/jobs/e2e_node/containerd/cri-master/env,gci-update-strategy=update_disabled" +``` + +Finally, run the tests with your custom config: + +```sh +make test-e2e-node REMOTE=true IMAGE_CONFIG_FILE="<local file>" [...] +``` + # Additional Test Options for both Remote and Local execution ## Only run a subset of the tests |
