Container Network Interface
Linux network namespace 와 네트워크 플러그인 사이의 인터페이스
Linux Container Runtime 이 CNI를 이용하여 Pod 네트워크를 설정
CNI Notion
- CNI의 네트워크 정의서는 JSON 형식으로 정의
- 네트워크 정의서는 STDIN을 통해 스트림으로 CNI plugin에 전달
- 다른 매개변수들은 환경변수로 plugin에 전달
- CNI plugin은 실행파일(executable)로 구현
Official
CNI
CNI ( Container Network Interface), a Cloud Native Computing Foundation project, consists of a specification and libraries for writing plugins to configure network interfaces in Linux containers, along with a number of supported plugins. CNI concerns itself only with network connectivity of containers and removing allocated resources when the container is deleted.
https://www.cni.dev/
Container Network
Container Network Interface
컨테이너 환경을 도입하려하면 기존 레거시(Legacy) 및 클라우드 환경에서 익숙해져 있던 방식대로 접근하면 여러모로 이해하기 힘든 부분이 있습니다. 크게 베어메탈 혹은 가성머신은 컨테이너 입장에서 Resource Pool이 되는 것이며 기존 서버는 절대로 죽지 않기 위해 관리해야될 대상이지만 컨테이너는 필요할때 동작하고 이용가치가 떨어지면 언제든지...
https://medium.com/@lhs6395/container-network-interface-e36b199be83f

Ray.H.Li - Medium
이전 주제에 Container Network Interface에 대해 정리를 해보았는데 사실 이 것만으로는 컨테이너가 어떻게 네트워킹을 하고 있는지 머리 속으로 그려지진 않을 겁니다. 오늘은 과연 컨테이너는 어떤 방식으로 통신을 하고 있는지 정리하고자 합니다. 여러 훌륭하신 분들의 블로그를 참조하였습니다. (참조: https://bluese05.tistory.com/15, https://arisu1000.tistory.com/27850) 일반적으로 Docker를 설치하면 docker0라는 가상 인터페이스가 생성됩니다. 현재 인터페이스를 보니 172.18.x.x 대역으로 자동으로 설정됩니다.
https://medium.com/@lhs6395

cni/SPEC.md at main · containernetworking/cni
This is CNI spec version 1.0.0. Note that this is independent from the version of the CNI library and plugins in this repository (e.g. the versions of releases). Released versions Released versions of the spec are available as Git tags. Do not rely on these tags being stable.
https://github.com/containernetworking/cni/blob/main/SPEC.md

Seonglae Cho