But running oc apply -f folder_with_resources_in_separate_files/ works.
I’ve tried changing the order of the resources within the file to see if it’s like a dependency issue, but could not get things working. Any ideas?
Thanks for the tip. I gave it a try and it didn’t work.
I’m stumped why the separator --- would make a difference in the way the YAML files or processed…just out of curiosity.
Please let me know if there are other things I can try.
I must be missing something fundamental because I can’t reason out why separate files would matter and why --- would matter when defining the resources.
hmmm …is each file intended to describe just one resource/object?
is it wrong to think of each file as a list of resources/objects?
I thought I’ve had YAML files that list multiple resources/objects, but maybe my memory is wrong…
is this a Kubernetes convention or a YAML convention?
ah…I think I understand now.
the latter keys in the YAML file overwrite the earlier keys
Kubernetes could have supported multiple resources in a single document if the root of the document starts off as a list
so I guess this is one of those by design things?
sorry for the barrage of messages and newbie mistake
thank you for pointing me in the right direction and pointing out a basic detail I had skipped over for the longest time
I said “usually” because that’s how many people manage their files - 1 resource == 1 file. But YAML has this syntax and we do support it, so users are free to do it 1:1 or N:1 as they see fit.