CNI setup
CNI setup for NeuReality must be performed once by your cluster administrator. You may skip this page if you are not a cluster administrator.
NeuReality CNI support
Currently, NeuReality supports Calico CNI, version 3.25.1 only. If you need to use another CNI plugin in your cluster, please contact NeuReality.
To perform the setup:
If you used the Tigera operator to install Calico, remove it after Calico installation. Othwerwise, the operator will interfere with the NeuReality CNI setup:
$ kubectl delete deployment tigera-operator -n tigera-operator
Modify the
cni-configConfigMap in thecalico-systemnamespace - add thesecondary_dataplane_optionsfield to the calico plugin in the plugins list:cni_config.yaml1apiVersion: v1 2data: 3 config: |- 4 { 5 "name": "k8s-pod-network", 6 "cniVersion": "0.3.1", 7 "plugins": [ 8 { 9 "type": "calico", 10 "datastore_type": "kubernetes", 11 "mtu": 0, 12 "nodename_file_optional": false, 13 "log_level": "Info", 14 "log_file_path": "/var/log/calico/cni/cni.log", 15 "ipam": { "type": "calico-ipam", "assign_ipv4" : "true", "assign_ipv6" : "false"}, 16 "container_settings": { 17 "allow_ip_forwarding": false 18 }, 19 "policy": { 20 "type": "k8s" 21 }, 22 "kubernetes": { 23 "k8s_api_root":"https://10.96.0.1:443", 24 "kubeconfig": "__KUBECONFIG_FILEPATH__" 25 }, 26 "secondary_dataplane_options": { 27 "type": "grpc", 28 "socket": "unix:///var/run/calico/secondary-cni-server.sock" 29 } 30 }, 31 { 32 "type": "bandwidth", 33 "capabilities": {"bandwidth": true} 34 }, 35 {"type": "portmap", "snat": true, "capabilities": {"portMappings": true}} 36 ] 37 } 38kind: ConfigMap 39metadata: 40 name: cni-config
Deploy RBAC constructs required for NeuReality Calico Dataplane Driver. Use this rbac.yaml:
$ kubectl apply -f rbac.yaml -n calico-system
Deploy the NeuReality Calico Dataplane Driver as a DaemonSet. Use this daemonset.yaml:
$ kubectl apply -f daemonset.yaml -n calico-system
Download and edit nr-calico-node.yaml.
You may need to change the environment variables in the YAML file, see instructions about configuring Calico node, the
Manifestsection.Apply
nr-calico-node.yaml:$ kubectl apply -f nr-calico-node.yaml -n calico-system
Wait for all the pods in the
calico-systemnamespace to become ready.