Install Kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
Install Kind
curl -Lo ./kind "https://kind.sigs.k8s.io/dl/v0.8.1/kind-$(uname)-amd64"
chmod +x ./kind
mv ./kind /some-dir-in-your-PATH/kind
It's recommended you setup a multi-node cluster (some tests depend on two schedulable nodes). In order to do this, you can setup a kind config to create multiple worker nodes, eg.:
Create a file named 2node.kindconfig
and add the following to it:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
Now you can create the cluster and use that config:
kind create cluster --config 2node.kindconfig
for node in $(kind get nodes); do
kubectl wait --for=condition=ready "node/$node"
done
Start by installing Multus in the cluster:
kubectl apply -f https://raw.githubusercontent.com/intel/multus-cni/v3.4.2/images/multus-daemonset.yml
Install the CNI binaries:
for node in $(kind get nodes); do
docker exec -it $node bash -c 'curl -fsSL https://github.com/containernetworking/plugins/releases/download/v0.8.6/cni-plugins-linux-amd64-v0.8.6.tgz | tar -xz -C /opt/cni/bin/'
done
Now you can use CNFs that require Multus and CNIs, e.g. examples/ip-forwarder