In kubernetes environment can I have rkt and docker container runtimes?

8/9/2018

Is it possible to have ONE kubernetes cluster with multiple container runtime engines like rkt, docker both active at a time? So that I can have

  • Two applications with two different container images.
  • One application with multiple services from different images.
-- Sudhakar MNSR
kubernetes

2 Answers

8/9/2018

Well, yes. But this has not so much to do with images. You'll have different nodes using different container runtimes (as long as you bootstrap and label them correctly), but the image will be the same as defined ie. in your deployment

-- Radek 'Goblin' Pieczonka
Source: StackOverflow

8/9/2018

From Kubernetes 1.5 it has been introduced the Container Runtime Interface (CRI) – a plugin interface which enables kubelet to use a wide variety of container runtimes, without the need to recompile.

Kubelet communicates with the container runtime (or a CRI shim for the runtime) over Unix sockets using the gRPC framework, where kubelet acts as a client and the CRI shim as the server.

enter image description here

CRI allows runtime-specific implementations and enables Kubernetes to have a cluster with mixed nodes (with container-runtime: docker, rkt) and specify for each node the container you want to use.

Kubelet has a property for that:

--container-runtime string
    The container runtime to use. Possible values: 'docker', 'rkt'. (default "docker")

Reference:

-- Nicola Ben
Source: StackOverflow