Skip to main content

3 docs tagged with "Golang"

View All Tags

[Container Network Interface] Implement Your CNI In Golang

As we know, the kubernetes use the CNI to provide the network connectivity for its Pod unit and the cluster administrator can choose what kind of the CNI should be installed in the cluster. For example, if the only requirement is the overlay network, you can choose the flannel CNI and choose the calico CNI if you have the requirement of the BGP. In this post, we will learn how to write your own CNI in golang language. Actually, You can implement it with any language as you like.

[Golang] aggregate in mongo

本篇文章首先跟大家分享一個常見的 Schema 設計,在此情境下,為了讀取一連串的資料,我們有不同種方式可以辦到。其中一種就是本文的主角, Aggregate 的概念。為了解釋 Aggregate 如何運作以及如何實現,本文採用 Golang 作為基本的程式語言,並且使用 mgo 作為與 mongo 進行處理的第三方函式庫。此外也採用了最原始的讀取方式,並且將此方式從撰寫方式以及效能兩方面直接與 Aggregate 進行比較。

使用 golang 開發第一個 CNI 程式

本篇文章算是一個手把手實作的文章,主要會介紹如何使用 golang 開發一個基於 Linux Bridge 的 CNI 應用程式,並且介紹如何搭配設定檔來使用這個 CNI 操作 Linux Network Namespace, 藉由這篇文章的過程理解到一個 CNI 的運作及開發,對於往後研究其他 CNI 都會有一些幫助,特別是城市的框架跟概念。 最後本篇開發的 CNI 應用程式其實是可以直接套用到 Kubernetes 裡面使用,就因為都遵循 CNI 的規則