Skip to content

Instantly share code, notes, and snippets.

@guangbochen
Last active August 24, 2020 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guangbochen/0940c47032be9c72e3b90c9396c57782 to your computer and use it in GitHub Desktop.
Save guangbochen/0940c47032be9c72e3b90c9396c57782 to your computer and use it in GitHub Desktop.
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: macvlan-conf
namespace: default
spec:
config: '{
"cniVersion": "0.3.0",
"type": "macvlan",
"master": "eth0",
"mode": "bridge",
"ipam": {
"type": "host-local",
"subnet": "172.16.0.254/16",
"rangeStart": "172.16.99.100",
"rangeEnd": "172.16.99.200",
"routes": [ { "dst": "0.0.0.0/0" } ],
"gateway": "172.16.0.1"
}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment