FWIW I can't think of why kubectl create -f should be any different from
kubectl apply -f. I almost want to suggest that create should be an alias
of apply. It might be worth while to understand the use case for using
kubectl create --save-config=false. In what situation would someone want to
do that? i.e. *not* save LastAppliedConfig?

On Fri, Apr 14, 2017 at 1:00 AM 'Ahmet Alp Balkan' via Kubernetes user
discussion and Q&A <kubernetes-users@googlegroups.com> wrote:

> It looks like when somebody creates something using "kubectl create -f",
> there's no command to update it the same way. When they use "kubectl
> apply", they get a warning:
>
> $ kubectl create -f ns.yml
> namespace "foo" created
> $ kubectl apply -f ns.yml
> *Warning: kubectl apply should be used on resource created by either
> kubectl create --save-config or kubectl apply*
> namespace "foo" configured
>
> I see adding this warning is previously discussed at #36620
> <https://github.com/kubernetes/kubernetes/issues/36620> and patched in
> #36672 <https://github.com/kubernetes/kubernetes/pull/36672>.
>
> In many of the Kubernetes tutorials, users are instructed to do "kubectl
> create -f". Should there be a symmetrical command that lets them update the
> resource with -f and works well with "kubectl create -f"d resources?
> Currently, this is a source of confusion for beginners. Would setting
> --save-config to true by default solve this problem?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes user discussion and Q&A" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kubernetes-users+unsubscr...@googlegroups.com.
> To post to this group, send email to kubernetes-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/kubernetes-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.
  • [kubernetes-... 'Ahmet Alp Balkan' via Kubernetes user discussion and Q&A
    • Re: [ku... 'Ian Lewis' via Kubernetes user discussion and Q&A
      • Re:... 'Mengqi Yu' via Kubernetes user discussion and Q&A
        • ... 'Ahmet Alp Balkan' via Kubernetes user discussion and Q&A

Reply via email to