@@ -44,10 +45,6 @@ RuntimeClass is used for selecting the container runtime configuration to use to
```json
"runtimes":{
"runc":{
"path":"/usr/bin/runc",
"runtime-args":[]
},
"kata-runtime":{
"path":"/usr/bin/kata-runtime",
"runtime-args":[
...
...
@@ -92,7 +89,7 @@ RuntimeClass is used for selecting the container runtime configuration to use to
$ sudo systemctl restart isulad
```
4. Define `RuntimeClass CRD` for example:
4. Define `kata-runtime.yaml` for example:
```yaml
apiVersion:node.k8s.io/v1beta1
...
...
@@ -102,6 +99,8 @@ RuntimeClass is used for selecting the container runtime configuration to use to
handler:kata-runtime
```
Execute `kubectl apply -f kata-runtime.yaml`
5. Define pod spec `kata-pod.yaml` for example:
```yaml
...
...
@@ -116,7 +115,6 @@ RuntimeClass is used for selecting the container runtime configuration to use to
image:busybox:latest
command:["/bin/sh"]
args:["-c","sleep1000"]
hostNetwork:true
```
6. Run pod:
...
...
@@ -128,4 +126,91 @@ RuntimeClass is used for selecting the container runtime configuration to use to
kata-pod-example 1/1 Running 4 2s
```
\ No newline at end of file
## CNI Network Configuration
iSulad realize the CRI interface to connect to the CNI network, parse the CNI network configuration files, join or exit CNI network. In this section, we call CRI interface to start pod to verify the CNI network configuration for simplicity.
1. Configure `isulad` in `/etc/isulad/daemon.json` :
```json
"network-plugin":"cni",
"cni-bin-dir":"/opt/cni/bin",
"cni-conf-dir":"/etc/cni/net.d",
```
2. Prepare CNI network plugins:
Compile and genetate the CNI plugin binaries, and copy binaries to the directory `/opt/cni/bin`.
The conf file suffix can be `.conflist` or `.conf`, the difference is whether it contains multiple plugins. For example, we create `10-mynet.conflist` file under directory `/etc/cni/net.d/`, the content is as follows: