bookmark_border[cilium] dev setup on Ubuntu 18.04.5

! Power off vmware vitrual machine.
Go to “edit virtual machine settings”
Go to processors. There are three checkboxes there.
Check second checkbox (enable VT-x/AMD-V)
Power on machine.

1. bare metal vm

$ sudo apt-get update
$ sudo apt-get -y upgrade
$ sudo apt-get -y autoremove
$ sudo apt-get autoclean
$ sudo apt-get install -y build-essential

2. install virtualbox

$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
$ sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"
$ sudo apt-get update
$ sudo apt-get install virtualbox-6.0

3. install vagrant

$ wget https://releases.hashicorp.com/vagrant/2.2.9/vagrant_2.2.9_x86_64.deb
$ sudo dpkg -i vagrant_2.2.9_x86_64.deb
$ sudo apt install nfs-kernel-server

4. git clone

$ git clone https://github.com/cilium/cilium.git

5. start vagrant

$ contrib/vagrant/start.sh
or
$ RUNTIME=containerd K8S=1 NWORKERS=1 contrib/vagrant/start.sh

if you see the error as below,

 "github.com/cilium/cilium/pkg/envoy.RequiredEnvoyVersionSHA=1177896bebde79915fe5f9092409bf0254084b4e" -X "github.com/cilium/cilium/pkg/datapath/loader.DatapathSHA=9a5b6a084b4265a833469d70b09adcdf055c3b0c" -extldflags -Wl,-soname,libcilium.so.1' -tags=osusergo,lockdebug  -o libcilium.so.1 -buildmode=c-shared
    runtime1: go: RLock /home/vagrant/go/src/github.com/cilium/cilium/go.mod: no locks available
    runtime1: Makefile:15: recipe for target 'libcilium.so' failed
    runtime1: make[1]: Leaving directory '/home/vagrant/go/src/github.com/cilium/cilium/proxylib'
    runtime1: make[1]: *** [libcilium.so] Error 1
    runtime1: Makefile:135: recipe for target 'proxylib' failed
    runtime1: make: *** [proxylib] Error 2
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
$ sudo systemctl enable rpc-statd  # Enable statd on boot
$ sudo systemctl start rpc-statd  # Start statd for the current session

bookmark_border[cilium] monitor-aggregation

ref. https://github.com/cilium/cilium/blob/master/install/kubernetes/quick-install.yaml

  # If you want cilium monitor to aggregate tracing for packets, set this level
  # to "low", "medium", or "maximum". The higher the level, the less packets
  # that will be seen in monitor output.
  monitor-aggregation: medium

  # The monitor aggregation interval governs the typical time between monitor
  # notification events for each allowed connection.
  #
  # Only effective when monitor aggregation is set to "medium" or higher.
  monitor-aggregation-interval: 5s

  # The monitor aggregation flags determine which TCP flags which, upon the
  # first observation, cause monitor notifications to be generated.
  #
  # Only effective when monitor aggregation is set to "medium" or higher.
  monitor-aggregation-flags: all

It can be changed by config_map.yaml

apiVersion: v1
kind: ConfigMap
metadata:
  name: cilium-config
  namespace: kube-system
data:
  monitor-aggregation: low
  monitor-aggregation-interval: 5s
$ kubectl apply -n kube-system -f cilium_config.yaml

check it

$ kubectl get configmap -n kube-system cilium-config -o yaml | grep monitor-aggregation

and then restart cilium agent!

$ kubectl delete pod cilium-* -n kube-system