Created
December 23, 2019 09:03
-
-
Save s1061123/9daa10ac6435b076f5dfa37fece3edd8 to your computer and use it in GitHub Desktop.
multus centos pod with runtimeConfig example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: "k8s.cni.cncf.io/v1" | |
kind: NetworkAttachmentDefinition | |
metadata: | |
name: centos-runtimeconfig-def | |
spec: | |
config: '{ | |
"cniVersion": "0.3.1", | |
"plugins": [ | |
{ | |
"type": "macvlan", | |
"capabilities": { "ips": true }, | |
"master": "eth1", | |
"mode": "bridge", | |
"ipam": { | |
"type": "static" | |
} | |
}, { | |
"capabilities": { "mac": true }, | |
"type": "tuning" | |
} ] | |
}' | |
--- | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: centos-runtimeconfig | |
annotations: | |
k8s.v1.cni.cncf.io/networks: '[ | |
{ "name": "centos-runtimeconfig-def", | |
"ips": [ "10.1.1.104/24" ], | |
"mac": "c2:b0:57:49:47:f1" } | |
]' | |
spec: | |
containers: | |
- name: centos-runtimeconfig | |
image: docker.io/centos/tools:latest | |
command: | |
- /sbin/init | |
securityContext: | |
privileged: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment