 
		
		
		
		
		
	
			
		
		
			
					
		In the guided excerises, is there any documentation to remember the syntax for writing a NetworkAttachmentDefinition resource file? Or will I have to memorize it? Is JSON a requirment when writing this file? I could not figure out a way to write it 100% in YAML.
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  name: custom
spec:
  config: |-
      {
        "cniVersion": "0.3.1",
        "name": "custom",
        "type": "host-device",
        "device": "ens4",
        "ipam": {
          "type": "static",
          "addresses": [{"address": "192.168.51.10/24"}]}}
 Chetan_Tiwary_
		
			Chetan_Tiwary_
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello @Richard4 !
As per the official documentation at : https://docs.openshift.com/container-platform/4.12/networking/multiple_networks/configuring-addition...
NAD config is a JSON-formatted CNI configuration
For a host device configuration example , it is pretty straight forward and simple :
and for static IPAM :
 "ipam": {
          "type": "static",
          "addresses": [{"address": "192.168.51.10/24"}]}}
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.