This tutorial will walk you through the installation of [cri-o](https://github.com/kubernetes-incubator/cri-o), an Open Container Initiative-based implementation of [Kubernetes Container Runtime Interface](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/container-runtime-interface-v1.md), and the creation of [Redis](https://redis.io/) server running in a [Pod](http://kubernetes.io/docs/user-guide/pods/).
## Prerequisites
A Linux machine is required to download and build the `cri-o` components and run the commands in this tutorial.
Create a machine running Ubuntu 16.10:
```
gcloud compute instances create cri-o \
--machine-type n1-standard-2 \
--image-family ubuntu-1610 \
--image-project ubuntu-os-cloud
```
SSH into the machine:
```
gcloud compute ssh cri-o
```
## Installation
This section will walk you through installing the following components:
* ocid - The implementation of the Kubernetes CRI, which manages Pods.
sudo sh -c 'cat >/etc/cni/net.d/10-mynet.conf <<-EOF
{
"cniVersion": "0.2.0",
"name": "mynet",
"type": "bridge",
"bridge": "cni0",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local",
"subnet": "10.88.0.0/16",
"routes": [
{ "dst": "0.0.0.0/0" }
]
}
}
EOF'
```
```
sudo sh -c 'cat >/etc/cni/net.d/99-loopback.conf <<-EOF
{
"cniVersion": "0.2.0",
"type": "loopback"
}
EOF'
```
At this point `cni` is installed and configured to allocation IP address to containers from the `10.88.0.0/16` subnet.
## Pod Tutorial
Now that the `cri-o` components have been installed and configured we are ready to create a Pod. This section will walk you through lauching a Redis server in a Pod. Once the Redis server is running we'll use telnet to verify it's working, then we'll stop the Redis server and clean up the Pod.
### Creating a Pod
First we need to setup a Pod sandbox using a Pod configuration, which can be found in the `cri-o` source tree:
```
cd $GOPATH/src/github.com/kubernetes-incubator/cri-o
```
Next create the Pod and capture the Pod ID for later use:
```
POD_ID=$(sudo ocic pod run --config test/testdata/sandbox_config.json)
```
> sudo ocic pod run --config test/testdata/sandbox_config.json
Use the `ocic` command to get the status of the Pod: