kubectl apply vs kubectl create?

前端 未结 9 1476
[愿得一人]
[愿得一人] 2020-11-29 15:06

What I understood by the documentation is that:

  • kubectl create = Creates a new k8s resource in the cluster
  • kubectl replace
9条回答
  •  半阙折子戏
    2020-11-29 15:21

    Just to give a more straight forward answer, from my understanding:

    apply - makes incremental changes to an existing object
    create - creates a whole new object (previously non-existing / deleted)


    Taking this from a DigitalOcean article which was linked by Kubernetes website:

    We use apply instead of create here so that in the future we can incrementally apply changes to the Ingress Controller objects instead of completely overwriting them.

提交回复
热议问题