Skip to content

Commit

Permalink
Update README.md with basic examples
Browse files Browse the repository at this point in the history
Signed-off-by: Yury Kulazhenkov <ykulazhenkov@nvidia.com>
  • Loading branch information
ykulazhenkov committed May 4, 2023
1 parent 0add66f commit 4cf9470
Showing 1 changed file with 54 additions and 1 deletion.
55 changes: 54 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,55 @@
# nvidia-k8s-ipam
IPAM plugin
NVIDI IPAM plugin

## Usage

### Deploy IPAM

_NOTE: This command will deploy latest dev build_

```
kubectl apply -f https://raw.githubusercontent.com/Mellanox/nvidia-k8s-ipam/main/deploy/nv-ipam.yaml
```

### Create config
```
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
name: nvidia-k8s-ipam-config
namespace: kube-system
data:
config: |
{
"pools": {
"pool1": {"subnet": "192.168.0.0/16", "perNodeBlockSize": 100 , "gateway": "192.168.0.1"},
"pool2": {"subnet": "172.16.0.0/16", "perNodeBlockSize": 50 , "gateway": "172.16.0.1"}
},
"nodeSelector": {"kubernetes.io/os": "linux"}
}
EOF
```

## CNI config

Example config for bridge CNI

```
cat > /etc/cni/net.d/10-mynet.conf <<EOF
{
"cniVersion": "0.2.0",
"name": "mynet",
"type": "bridge",
"bridge": "mytestbr",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "nv-ipam",
"poolName": "pool1"
}
}
EOF
```

0 comments on commit 4cf9470

Please sign in to comment.