I practice Kubernetes on my windows machine. I need to create a YAML file to run some objects on Kubernetes but I couldn't able to create YAML file with CLI command on windows. There are alternative ways to make it in brute force such as creating txt and then changing its extension manually but I wonder if there is any way to create a YAML file via cmd similar to Linux (touch yamlfile.yaml
)
Thank you in advance.
update: @tquadrat answer helps to create yamlfile successfully but on windows cmd, when you try to edit yamlfile via default notepad, that turns out .txt again instead of .yaml
My palliative solution is to use VScode to create yamlfiles and also using terminal in VScode.
CodePudding user response:
On Linux, touch yamlfile.yaml
creates an empty file. If this is your goal, try
echo. > yamlfile.yaml