kubectl apply vs create: Which One to Use for Creating Resources in Kubernetes Cluster Environment?

kubectl apply and kubectl create both are two different approaches to create resources in Kubernetes cluster environment.

They both create resources from either a file or from STDIN.

Now let8217s go in some detailing and understand how kubectl apply and create differ from each other while implementing.

kubectl create is what we call imperative management. On this approach you tell the Kubernetes API what you want to create replace or delete.

In simpler words create creates a whole new object previously non-existing or deleted.

kubectl apply is part of the declarative management approach where changes that you may have applied to a live object i.e. through scale will be 8220maintained8221 even if you apply other changes to the object.

In simpler words apply 8211 makes incremental changes to an existing object by defining what we need.

...

Read Full Post

News Link: https://linuxhandbook.com/kubectl-apply-vs-create/.
RSS Link: https://linuxhandbook.com/feed/.

Linux Chatter is a news aggregator service that curates some of the best Linux, Cloud, Technical Guides, Hardware and Security news. We display just enough content from the original post to spark your interest. If you like the topic, then click on the 'read full post' button to visit the author's website. Use Linux Chatter to find content from amazing authors!

Note: The content provided has been modified and is not displayed as intended by the author. Any trademarks, copyrights and rights remain with the source.

Disclaimer: Linux Chatter sources content from RSS feeds and personal content submissions. The views and opinions expressed in these articles are those of the authors and do not necessarily reflect those of Linux Chatter.