Skip to content

Commit

Permalink
Add mac/interfaceRequest section in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
s1061123 committed Nov 8, 2018
1 parent e505174 commit 60dfae1
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions README.md
Expand Up @@ -387,6 +387,48 @@ NAME READY STATUS RESTARTS AGE
multus-multi-net-poc 1/1 Running 0 30s
```

#### Pod Annotation Parameters

JSON formated network annotation in Pod can have several parameters as following:

- namespace: Kubernetes namespace that the target network attach definition is defined in.
- mac: MAC address (e.g "c2:11:22:33:44:66") for target network interface
- interfaceRequest: interface name for target network interface

Note: If you add `mac`, please add 'tuning' plugin into target network attach definition as CNI plugin chaining as following.

```
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: macvlan with tuning
spec:
config: '{
"cniVersion": "0.3.0",
"name": "chains",
"plugins": [ {
"type": "macvlan",
"master": "eth0",
"mode": "bridge",
"ipam": {
"type": "host-local",
"subnet": "192.168.1.0/24",
"rangeStart": "192.168.1.200",
"rangeEnd": "192.168.1.216",
"routes": [
{ "dst": "0.0.0.0/0" }
],
"gateway": "192.168.1.1"
}
},
{
"name":"macchange",
"type":"tuning"
}]
}'
```

### Verifying Pod network interfaces

1. Run `ifconfig` command in Pod:
Expand Down

0 comments on commit 60dfae1

Please sign in to comment.