概要
CNI(Container Network Interface)は、Linux containerを起動・削除するときにruntimeがnetwork pluginを呼び出し、interface、IP address、routeなどを設定・解放するための共通仕様です。このrepositoryにはspec、Go向け`libcni`、pluginを直接試す`cnitool`が含まれ、実際のbridge・loopback等のreference pluginは別repositoryで管理されています。
特徴と向いている用途
公式資料に基づく紹介・実機未検証 · 内容確認日:
runtimeとnetwork plugin間の契約を標準化する
container ID、network namespace、interface名、configuration JSONなどをpluginへ渡す方法と、ADD/DEL/CHECK等のcommand behaviorをspecとして定義します。
libcniとcnitoolでintegration・plugin検証を支援する
Go applicationからCNI configurationを実行するlibcniと、container runtimeなしでpluginを試せるcnitoolを提供します。
Kubernetes・container runtime・network pluginを連携させる場合に
Cilium、Calico、cloud provider pluginなど異なるnetwork implementationをruntimeから共通形式で呼び出したいcontainer platformの基盤に向きます。
出典:[2]
CNI specと実際のnetwork pluginを分けてversion互換性を確認する
このrepository単体ではcompleteなcontainer networkを提供しません。runtime、CNI spec version、使用pluginが共通して対応するversionを確認し、plugin upgradeは本番前に検証してください。
参考にした公式資料
- [1]containernetworking/cni repository(2026-09-20)
- [2]CNI README(2026-09-20)
- [3]CNI Apache-2.0 license(2026-09-20)
- [4]CNI specification(2026-09-20)
- [5]cnitool documentation(2026-09-20)
編集部からの補足
CNI自体はKubernetes用の一つのnetwork製品ではなく、runtimeがCalico/Cilium等のpluginを呼び出すための共通仕様です。このrepositoryにはspec、Go library、cnitoolがあり、bridge等のreference pluginは別repositoryです。Ciliumのような実装とCNI仕様そのものを分けて理解すると構成が整理しやすくなります。
3ステップで試す
- 1
CNI repositoryとcnitoolをbuild
CNI specとlibcniを含むrepositoryからdeveloper向けcnitoolをbuildします。
git clone https://github.com/containernetworking/cni.git && cd cni && go build -o ./bin/cnitool ./cnitool - 2
reference pluginsを別repositoryからbuild
CNI本体にはbridge等のreference pluginが含まれないため、公式plugins repositoryを別途buildします。
git clone https://github.com/containernetworking/plugins.git && cd plugins && ./build_linux.sh - 3
隔離network namespaceでpluginを試す
hostの実networkへ影響させず、ADD/CHECK/DELの流れとCNI spec version互換性を確認します。
Use cnitool with a temporary network namespace and a test CNI config
成長
成長の推移 · 直近30日
6,118 Stars
推移データを蓄積中です。
開発アクティビティ
直近90日・週次
- Commit(直近30日)
- 1
- Open PR
- 35
- Issue登録
- 1
- Issue解決
- 2
- PR登録
- 3
- PRマージ
- 2
Issues
1 / 2
Pull Requests
3 / 2
メンテナンス状況
- Issue初回応答中央値
- 79日
- Issue応答率
- 100% (1/1)
直近90日に外部から作成されたIssue(新しい順に最大100件)が対象です。OWNER・MEMBER・COLLABORATORによる最初のコメントを応答とし、全コメントを確認できないIssueは集計から除外します。中央値と応答率は週次更新です。
Built with
カテゴリとタグ
GitHubデータ
GitHubのデータGitHubの詳細データを見る
GitHub Topics
- docker
- networking
- containers
- kubernetes
- Stars
- 6,118
- Forks
- 1,164
- Watchers
- 216
- Open Issues
- 119
- Contributors
- 148
- 主要言語
- Go
- ライセンス
- Apache-2.0
- リポジトリ最終更新
- 2026/09/14
関連情報
関連記事を投稿するこのOSSの使い方や活用事例をMarkdownで投稿できます。管理者が承認した後に公開されます。
あわせて探訪
- Kubernetes127,843 Stars
複数ホスト上のコンテナ配置・保守・スケーリングを担うクラウドネイティブ基盤。
Go - RustDesk124,007 Stars
Windows・macOS・Linux・モバイルを遠隔操作し、ID/relayサーバーも自分で運用できるリモートデスクトップ。
Rust - Supabase110,326 Stars
Postgresを中心にAuth・API・Realtime・Storage・Functionsをまとめ、Hosted/local/self-hostを選べる開発プラットフォーム。
TypeScript - Moby72,112 Stars
コンテナ基盤を交換可能な部品から組み立てる、Docker製品の上流オープンソースプロジェクト。
Go - Ansible70,732 Stars
SSHと人が読める記述で、構成管理・配備・クラウド・ネットワーク運用をagentなしに自動化する基盤。
Python
情報の誤りを報告
掲載内容に誤りや古い情報があればお知らせください。