Welcome to the Linux Foundation Forum!

Labs 7.3 and 7.5 - edit command vs update YAML file

Hello,

On Labs 7.3 and 7.5 the command <$ kubectl edit> is used to either modify an existing deployment or daemonset.

On the linux foundation cours LFS158 (introduction to kubernetes), the YAML file of an existing object was modified via text editor, and then the object (deployment,...) was deleted and created again.

I wonder when we should use the "edit" command to update an object while it is running, and when we should update the Yaml file of the object, then delete and create it again.

I guess both methods have its advantages and disadvantages, I would appreciate if someone could shed some light on this.

Thank you,

Josep Maria

Best Answer

  • chrispokorni
    chrispokorni Posts: 2,372
    Answer ✓

    Hi @josepmaria,

    The direct edit approach is often used in early development stages, while the definition manifest edit coupled with a redeployment is commonly found in advanced deployment pipelines.

    Regards,
    -Chris

Answers

Categories

Upcoming Training