Network

Configuring robust networking for the cluster.

To easily manage your application it’s better to use combination of WaveNet and MetalLB. First one is network plugin, second provides load balancer implementation for the bear-metal k8s clusters.

To install WaveNet simply run:

kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"

For MetalLB you need to create ConfigMap first:

apiVersion: v1
kind: ConfigMap
metadata:
  namespace: metallb-system
  name: config
data:
  config: |
    address-pools:
    - name: default
      protocol: layer2
      addresses:
      - 192.168.0.110-192.168.0.120

Where 192.168.1.110-192.168.1.120 is a range of IP addresses you’re allocating for a cluster.

Install MetalLB:

kubectl apply -f https://raw.githubusercontent.com/google/metallb/v0.8.1/manifests/metallb.yaml

Modify /etc/rc.local and add the following before exit:

ifconfig wlan0 promisc

This will enable promiscuous mode for wlan0 interface upon boot.

WARN If you're using different connection, make sure that you put correct interface name.