What is difference between kubectl create and kubectl apply?
Basically kubectl create is a "imperative" way of creating resources in kubernetes. kubectl create doesn't use last-applied-configuration. kubectl create directly talks to api-server. It doesn't look into the live object configuration created by kubernetes. Not recommeded to use in production and while working with team and code on version control system like git.
Whereas, kubectl apply is a "declarative" way to creating and managing resources. kubectl apply creates last-applied-configuration inside the live object configuration created by kubernetes. kubectl apply compares local configuration with last-applied configuration and bring the resource in desired state.
Timeline:
00:00-19:18 - kubectl create
19:19-44:60 - kubectl apply
Visit us - https://networknuts.net
social - networknuts
Watch video Why to use kubectl apply in production - kubectl create vs kubectl apply - CKA Training online, duration hours minute second in high quality that is uploaded to the channel networknutsdotnet 12 October 2023. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 542 times and liked it 15 visitors.