Kubernetes/Container Runtimes OCI

From Ever changing code
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Overview

ClipCapIt-200717-081709.PNG

CRI Container Runtime Interface

Introduced in K8s in 2016, uses gRPC to expose the interface, can talk to different runtimes through the same API

containerd

ClipCapIt-200717-092524.PNG


Running in Kubernetes, execute on every node. You point kubelet to unix socket, that listens for gRPC/CRI calls.

systemctl start containerd
kubelet --containre-runtime=remote --runtime-request-timeout=15m \
        --containre-runtime-endpoint=unix:///run/containerd/containerd.sock

# Service unit
[Service]
Environment="KUBELET_EXTRA_ARGS=--containre-runtime=remote --runtime-request-timeout=15m 
--containre-runtime-endpoint=unix:///run/containerd/containerd.sock"

Worth to note:

  • when you restart containerd daemon all your containers also get restarted

Resources

CRI-O

ClipCapIt-200717-094421.PNG


Start it up, by pointing to a socket that listens for gRPC/CRI calls.

systemctl start crio
kubelet --container-runtime=remote --runtime-request-timeout=15m \
        --container-runtime-endpoint /var/run/crio/crio.sock ...

Worth to note:

  • restarting the cri-o daemon won't cause container restart