From 62ec499d6ff1518340424b1bfa6782627be5c7cd Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Thu, 8 Nov 2018 11:50:49 -0800 Subject: [PATCH] kubectl convert: add deprecation warning for 1.13 --- pkg/kubectl/cmd/convert/convert.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/kubectl/cmd/convert/convert.go b/pkg/kubectl/cmd/convert/convert.go index 251b15540e..2faaf59f4f 100644 --- a/pkg/kubectl/cmd/convert/convert.go +++ b/pkg/kubectl/cmd/convert/convert.go @@ -134,6 +134,14 @@ func (o *ConvertOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) (err er // RunConvert implements the generic Convert command func (o *ConvertOptions) RunConvert() error { + + // Convert must be removed from kubectl, since kubectl can not depend on + // Kubernetes "internal" dependencies. These "internal" dependencies can + // not be removed from convert. Another way to convert a resource is to + // "kubectl apply" it to the cluster, then "kubectl get" at the desired version. + // Another possible solution is to make convert a plugin. + fmt.Fprintf(o.ErrOut, "kubectl convert is DEPRECATED and will be removed in a future version.\nIn order to convert, kubectl apply the object to the cluster, then kubectl get at the desired version.\n") + b := o.builder(). WithScheme(scheme.Scheme). LocalParam(o.local)