mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-10-21 15:30:24 +00:00
64 lines
1.4 KiB
YAML
64 lines
1.4 KiB
YAML
---
|
|
apiVersion: "k8s.cni.cncf.io/v1"
|
|
kind: NetworkAttachmentDefinition
|
|
metadata:
|
|
name: macvlan1-config
|
|
spec:
|
|
config: '{
|
|
"cniVersion": "0.3.1",
|
|
"plugins": [
|
|
{
|
|
"type": "macvlan",
|
|
"capabilities": { "ips": true },
|
|
"master": "eth1",
|
|
"mode": "bridge",
|
|
"ipam": {
|
|
"type": "static"
|
|
}
|
|
}, {
|
|
"type": "tuning"
|
|
} ]
|
|
}'
|
|
---
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: macvlan1-worker1
|
|
annotations:
|
|
k8s.v1.cni.cncf.io/networks: '[
|
|
{ "name": "macvlan1-config",
|
|
"ips": [ "10.1.1.11/24" ] }
|
|
]'
|
|
labels:
|
|
app: macvlan
|
|
spec:
|
|
containers:
|
|
- name: macvlan-worker1
|
|
image: centos:8
|
|
command: ["/bin/sleep", "10000"]
|
|
securityContext:
|
|
privileged: true
|
|
nodeSelector:
|
|
kubernetes.io/hostname: kind-worker
|
|
---
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: macvlan1-worker2
|
|
annotations:
|
|
k8s.v1.cni.cncf.io/networks: '[
|
|
{ "name": "macvlan1-config",
|
|
"ips": [ "10.1.1.12/24" ] }
|
|
]'
|
|
labels:
|
|
app: macvlan
|
|
spec:
|
|
containers:
|
|
- name: macvlan-worker2
|
|
image: centos:8
|
|
command: ["/bin/sleep", "10000"]
|
|
securityContext:
|
|
privileged: true
|
|
nodeSelector:
|
|
kubernetes.io/hostname: kind-worker2
|