Welcome to the Linux Foundation Forum!

Create resources commands, apply -f vs create -f

Hello,

I can see on the labs from this LFS8 (ie. Labs from the 9 chapter) objects are often created from a yaml file using the command create -f instead of apply -f.

In the former LFS158, whenever an object was created from a yaml file, the command used was apply -f.

I know both commands lead to the same output, but I would like to know why on this course the use of create -fis favoured instead of apply -f.

One is an imperative appraoch (create) and while the other one is a declarative (apply), but both are used to create an object from a yaml file. So I do not understand what is the difference.

Thanks in advance for your time and answer.

Sincerely,

Josep Maria

Categories

Upcoming Training