DEV Community

Cover image for So is it .yaml? Or .yml?
derek
derek

Posted on

So is it .yaml? Or .yml?

Specifically in the context of k8s and docker which file extension is preferred?

When I asked my friend, his response was quite convincing...

I like .yml, it's 25% faster to write

☝😆

Personally, I'm fine with whichever is the "standard"/majority preference for consistency sake.

Fun fact - Though .yaml is recommended, many codebases and documentation around the 🌎 begs to differ.

Top comments (10)

Collapse
 
smirza profile image
Suhail

I don't know why, but for some reason, I prefer .yaml over .yml.

Collapse
 
derek profile image
derek

Nice! Thanks for chiming in.

Just a quick follow up random question, if you were working on a project(s) and there was a mix between both .yml and .yaml files would it bother/annoy you?

Collapse
 
smirza profile image
Suhail

Ah. Now that would be annoying for sure. If it was me I would go in and check to see if renaming them would have any issues. If not I would simply go ahead and rename them to .yaml and make sure it is following a standard.

Collapse
 
mead650s profile image
David Mead

So does Google Cloud Platform!

Collapse
 
gowizzard profile image
Jonas Kwiedor

I have to agree with that.

Collapse
 
rochacbruno profile image
Bruno Rocha

In my project dynaconf I choosen to support both .yaml and .yml (I also added support for .toml and .tml knowing no one uses .tml)

Collapse
 
bovermyer profile image
Ben Overmyer

I prefer .yml for one simple reason - I grew up in a time when file names were at most eight characters long, file extensions were three characters long, and the operating system enforced that.

Collapse
 
sandydunlop profile image
Sandy Dunlop

When was that? I grew up in the 90s and neither Solaris nor HPUX had any such limitation.

I prefer .yaml as it's literally the name of the file type and how it's pronounced.

Collapse
 
pierrehenrey profile image
Pierre-Henry

.yml, is 25% faster to write

This is surprising! Do you have any proof?

Collapse
 
derek profile image
derek

Nice! Great DX! But...

true statement