Home Explore Blog CI



kubernetes

6th chunk of `content/en/blog/_posts/2016-12-00-Container-Runtime-Interface-Cri-In-Kubernetes.md`
da8e7e833a25ab43f9c90fc02e17c55282fb71ae0fa2b3a00000000100000cca
Besides a few [missing features](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/container-runtime-interface.md#docker-cri-integration-known-issues), the new integration has consistently passed the main end-to-end tests. We plan to expand the test coverage soon and would like to encourage the community to report any issues to help with the transition.



**CRI with Minikube**



If you want to try out the new integration, but don’t have the time to spin up a new test cluster in the cloud yet, [minikube](https://github.com/kubernetes/minikube) is a great tool to quickly spin up a local cluster. Before you start, follow the [instructions](https://github.com/kubernetes/minikube) to download and install minikube.



1. Check the available Kubernetes versions and pick the latest 1.5.x version available. We will use v1.5.0-beta.1 as an example.




```
$ minikube get-k8s-versions
 ```



2. Start a minikube cluster with the built-in docker CRI integration.




```
$ minikube start --kubernetes-version=v1.5.0-beta.1 --extra-config=kubelet.EnableCRI=true --network-plugin=kubenet --extra-config=kubelet.PodCIDR=10.180.1.0/24 --iso-url=http://storage.googleapis.com/minikube/iso/buildroot/minikube-v0.0.6.iso
 ```



--extra-config=kubelet.EnableCRI=true` turns on the CRI implementation in kubelet. --network-plugin=kubenet and --extra-config=kubelet.PodCIDR=10.180.1.0/24  sets the network plugin to kubenet and ensures a PodCIDR is assigned to the node.  Alternatively, you can use the cni plugin which does not rely on the PodCIDR. --iso-url sets an iso image for minikube to launch the node with. The image used in the example



3. Check the minikube log to check that CRI is enabled.





```
$ minikube logs | grep EnableCRI

I1209 01:48:51.150789    3226 localkube.go:116] Setting EnableCRI to true on kubelet.
 ```



4. Create a pod and check its status. You should see a “SandboxReceived” event as a proof that Kubelet is using CRI!




```
$ kubectl run foo --image=gcr.io/google\_containers/pause-amd64:3.0

deployment "foo" created

$ kubectl describe pod foo

...

... From                Type   Reason          Message  
... -----------------   -----  --------------- -----------------------------

...{default-scheduler } Normal Scheduled       Successfully assigned foo-141968229-v1op9 to minikube  
...{kubelet minikube}   Normal SandboxReceived Pod sandbox received, it will be created.

...
 ```



_Note that kubectl attach/exec/port-forward does not work with CRI enabled in minikube yet, but this [will be addressed in the newer version of minikube](https://github.com/kubernetes/minikube/issues/896). _





Community


CRI is being actively developed and maintained by the Kubernetes [SIG-Node](https://github.com/kubernetes/community/blob/master/README.md#special-interest-groups-sig) community. We’d love to hear feedback from you. To join the community:




- Post issues or feature requests on [GitHub](https://github.com/kubernetes/kubernetes)
- Join the #sig-node channel on [Slack](https://kubernetes.slack.com/)
- Subscribe to the [SIG-Node mailing list](mailto:kubernetes-sig-node@googlegroups.com)
- Follow us on Twitter [@Kubernetesio](https://twitter.com/kubernetesio) for latest updates

Title: Testing CRI with Minikube and Community Resources
Summary
The new CRI integration has passed end-to-end tests. To test CRI, Minikube can be used to quickly set up a local cluster. Steps include checking available Kubernetes versions, starting Minikube with CRI enabled, verifying CRI enablement in logs, and checking pod status for a 'SandboxReceived' event. Note that kubectl attach/exec/port-forward are not yet supported. CRI is actively developed by the Kubernetes SIG-Node community, with resources available for feedback, issues, Slack, mailing list, and Twitter.