• Stars
    star
    1,008
  • Rank 44,563 (Top 0.9 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated 6 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

dockerd as a compliant Container Runtime Interface for Kubernetes

docker and kubernetes interact

cri-dockerd

This adapter provides a shim for Docker Engine that lets you control Docker via the Kubernetes Container Runtime Interface.

IMPORTANT

For users running 0.2.5 or above, the default network plugin is cni. Kubernetes 1.24+ has removed kubenet and other network plumbing from upstream as part of the dockershim removal/deprecation. In order for a cluster to become operational, Calico, Flannel, Weave, or another CNI should be used.

For CI workflows, basic functionality can be provided via containernetworking/plugins.

Motivation

Mirantis and Docker have agreed to partner to maintain the shim code standalone outside Kubernetes, as a conformant CRI interface for the Docker Engine API. For Mirantis customers, that means that Docker Engineโ€™s commercially supported version, Mirantis Container Runtime (MCR), will be CRI compliant. This means that you can continue to build Kubernetes based on the Docker Engine as before, just switching from the built in dockershim to the external one.

Mirantis and Docker intend to work together on making sure it continues to work as well as before and that it passes all the conformance tests and continues to work just like the built in version did. Mirantis will be using this in Mirantis Kubernetes Engine, and Docker will continue to ship this shim in Docker Desktop.

You can find more information about the context for this tool in Don't Panic: Kubernetes and Docker and on the Mirantis blog.

Community

We can be found on the Kubernetes Slack in the #cri-dockerd channel.

Using cri-dockerd

Install

The easiest way to install cri-dockerd is to use one of the pre-built binaries or packages from the releases page. There are numerous supported platforms and using a pre-built package will install the binary and setup your system to run it as a service.

Please refer to your platform's documentation for how to install a package for additional help with these.

Advanced Setup

Installing manually

Note: the release packages will install to /usr/bin which is reserved for binaries managed by a package manager. Manual installation doesn't involve a package manager and thus uses /usr/local/bin and the service file must be edited to reflect this.

If you would like to install the project manually, you will need to place the binary somewhere in your PATH and setup a service to run it. The following command is a manual install for a Linux system using systemd:

git clone https://github.com/Mirantis/cri-dockerd.git

The above step creates a local directory called cri-dockerd which you will need for the following steps.

To build this code (in a POSIX environment):

https://go.dev/doc/install

cd cri-dockerd
make cri-dockerd

To build for a specific architecture, add ARCH= as an argument, where ARCH is a known build target for golang

You can find pre-compiled binaries and deb/rpm packages under:

https://github.com/Mirantis/cri-dockerd/releases

Where VERSION is the latest available cri-dockerd version:

https://github.com/Mirantis/cri-dockerd/releases/download/v${VERSION}/cri-dockerd-${VERSION}.${ARCH}.tgz

To install, on a Linux system that uses systemd, and already has Docker Engine installed

# Run these commands as root

cd cri-dockerd
mkdir -p /usr/local/bin
install -o root -g root -m 0755 cri-dockerd /usr/local/bin/cri-dockerd
install packaging/systemd/* /etc/systemd/system
sed -i -e 's,/usr/bin/cri-dockerd,/usr/local/bin/cri-dockerd,' /etc/systemd/system/cri-docker.service
systemctl daemon-reload
systemctl enable --now cri-docker.socket

To use with Kubernetes

The default network plugin for cri-dockerd is set to cni on Linux. There are a few ways to change this depending on how you are running the binary.

--network-plugin=${plugin} can be passed in as a command line argument when

  • running the binary directly
  • adding to /usr/lib/systemd/system/cri-docker.service if a service isn't enabled
  • adding to /etc/systemd/system/multi-user.target.wants/cri-docker.service if a service is enabled

Run systemctl daemon-reload to restart the service if it was already running.

Development

Building

If you would like to build the project yourself, you will need to have Go installed. You can find directions for installing the latest version on its website:

Install the latest version of Go

Once you have Go installed, you can build the project by running the following command:

make cri-dockerd

This will output the binary to the project's root directory as cri-dockerd. You can then run it directly or install it using the manual process above.

To build for a specific architecture, add ARCH= as an argument, where ARCH is a known build target for Go.

ARCH=amd64 make cri-dockerd

Development Setup

When developing, it is nice to have a separate environment to test in so that you don't have to worry about breaking your system. An easy way to do this is by setting up a minikube cluster since it uses cri-dockerd by default. Follow the minikube installation instructions to get it installed.

You'll then be able to create a cluster in minikube's VM by running:

minikube start

Once the cluster is up, we have a make command that will build cri-dockerd and swap it out for the version running in the cluster. You can run this command by running:

make dev

Docs

This folder contains the files used to generate the cri-dockerd documentation.

The docs are generated using Hugo and the Geekdocs theme.

Editing Docs

The docs can be ran locally with hot-reloading to make editing easier. To do so, run the following command in the project's root directory:

make docs

This will launch the development server that is included with Hugo. You can then access the docs at http://localhost:1313/

More Repositories

1

virtlet

Kubernetes CRI implementation for running VM workloads
Go
735
star
2

k8s-AppController

AppController is a pod that you can spawn in your Kubernetes cluster which will take care of your complex deployments for you.
Go
219
star
3

kqueen

Kubernetes queen - cluster manager
Python
138
star
4

pipeline-library

Groovy
97
star
5

k8s-externalipcontroller

External IP controller is k8s application which is deployed on top of k8s cluster and which configures External IPs on k8s worker node(s) to provide IP connectivity.
Go
78
star
6

k8s-netchecker-server

Basic network checker service to check DNS and connectivity in kubernetes cluster
Go
67
star
7

compliance

Docker Enterprise Edition Security Controls for Compliance
Go
66
star
8

openstack-lbaas

Load balancing service for OpenStack
Python
53
star
9

criproxy

Multiple CRIs per node & running CRI implementations inside pods
Go
41
star
10

k8s-apps

Kubernetes Helm charts
Go
40
star
11

ceph-lcm

Python
36
star
12

disk_perf_test_tool

Python
36
star
13

reclass-system-salt-model

32
star
14

fuel

Ruby
32
star
15

mk-pipelines

Groovy
27
star
16

launchpad

27
star
17

fuelweb

Python
23
star
18

k8s-daemonupgradecontroller

DaemonSet upgrade controller for kubernetes
23
star
19

k8s-devbox

Reproducible Kubernetes development environment
Shell
19
star
20

mk-lab-salt-model

DEPRECATED - this lab model is outdated and not maintained.
Shell
16
star
21

stepler

Full documentation
Python
15
star
22

mos-integration-tests

Python
14
star
23

lens-extension-cc

A Lens Extension that makes it easy to connect Lens to a Mirantis Container Cloud instance and add its clusters to Lens.
JavaScript
14
star
24

k8s-netchecker-agent

Basic network checker agent to check DNS and connectivity in kubernetes cluster
Go
13
star
25

stackalytics

OpenStack contribution dashboard
Python
12
star
26

openstack-utils

Python
11
star
27

CloudFerry

Openstack workload migration tool
Python
9
star
28

kostyor

Orchestrate OpenStack upgrades
Python
9
star
29

kqueen-ui

Separated UI for https://github.com/Mirantis/kqueen
Python
9
star
30

solar

This repo is OUTDATED!!! We moved to OpenStack
Python
8
star
31

swift-encrypt

Python
8
star
32

mos-horizon

Python
7
star
33

cloudpipe-image-auto-creation

Fully automated cloudpipe image creation
Shell
7
star
34

release-openstack-k8s

Shell
7
star
35

tcp-qa

Python
6
star
36

gosa-openstack

Gosa plugin for managing Nova users
6
star
37

vmware-dvs

Python
6
star
38

dhcp-relay

DHCPv4-Relay (opinionated Golang implementation).
Go
5
star
39

fuel-main

Python
5
star
40

devops

Python
5
star
41

training-lab

Training lab for MCP in Azure
HCL
5
star
42

mcc-on-equinix-terraform-templates

mcc-on-equinix-terraform-templates
HCL
5
star
43

ceph-monitoring

Python
5
star
44

rabbitmq-autocluster

5
star
45

puppet-bootstrap

Bootstrap scripts for Foreman and Puppet servers
Shell
4
star
46

statkube

Kubernetes development stats
Go
4
star
47

openstack-fedora-specs

Shell
4
star
48

fuel-plugin-standalone-ceph

Puppet
4
star
49

nova-scheduler-volume-affinity-filter

Python
4
star
50

terraform-provider-k0sctl

Go
4
star
51

rally-plugins

Custom rally plugins for testing platform components
Python
4
star
52

zabbix-configuration-files

Zabbix configuration files
3
star
53

dataops-dataeng

A tool to scrape data from multiple integrations
Go
3
star
54

fuel-docs

Python
3
star
55

openstack-ha-tests

The repository with HA/destructive tests for OpenStack clouds
Python
3
star
56

telegraf

Go
3
star
57

kostyor-openstack-ansible

OpenStack Ansible driver for Kostyor.
Python
3
star
58

mos-tempest-runner

The repository with scripts which allow to run Tempest tests for OpenStack clouds
Python
3
star
59

security

Home of the Mirantis PSIRT
2
star
60

fuelweb-test

Python
2
star
61

mcp-common-scripts

Shell
2
star
62

stacklight-salt-model

Shell
2
star
63

launchpad-reports-summary

status
JavaScript
2
star
64

ucpbackup

Shell
2
star
65

puppet-savanna

Ruby
2
star
66

terraform-provider-msr

Go
2
star
67

docker-aptly

Shell
2
star
68

fuel-plugin-external-ceph

Puppet
2
star
69

tools-sustaining

Python
2
star
70

osagent

Python agent for Windows that sets password. Works with OpenStack + XCP
Python
2
star
71

astute

Ruby
2
star
72

container-cloud-cli

PowerShell
2
star
73

mos-ci-deployment-scripts

Shell
2
star
74

docker-jenkins

CSS
2
star
75

openstack-lbaas-cli

CLI for OpenStack LBaaS
Python
1
star
76

mirantis-demos

Shell
1
star
77

cvp-configuration

Shell
1
star
78

rpc_monitor

monitoring tools for oslo.messaging
Python
1
star
79

f2s

Python
1
star
80

mos-updates

1
star
81

docker-gerrit

CSS
1
star
82

openstack-k8s-virtual-lab

Shell
1
star
83

solar-qa

1
star
84

cvp-sanity-checks

Python
1
star
85

rundeck-cis-jobs

1
star
86

mira-ceph-ansible

Python
1
star
87

puppet-control-template

Generic template for Puppet Control repository
Ruby
1
star
88

fuel-provision

1
star
89

bird-containers

Shell
1
star
90

whale

Python
1
star
91

mos-components-ci

Shell
1
star
92

k8s-istio-webinar

Shell
1
star
93

k8srnd-sockshop-catalogue

Go
1
star
94

fuel-plugin-backup

Shell
1
star
95

ifmap-python-client

Python
1
star
96

rally

1
star
97

sriov-scheduler

Go
1
star
98

terraform-provider-mirantis

This is Mirantis' terraform module containing providers for all Mirantis products
Go
1
star
99

helm-charts

Smarty
1
star
100

ccp-docker-jenkins

Shell
1
star