Unverified Commit e3ddd857 authored by k8s-ci-robot's avatar k8s-ci-robot Committed by GitHub

Merge pull request #70820 from seans3/kubectl-convert-deprecate

kubectl convert: add deprecation warning for 1.13
parents f49464e8 62ec499d
...@@ -134,6 +134,14 @@ func (o *ConvertOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) (err er ...@@ -134,6 +134,14 @@ func (o *ConvertOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) (err er
// RunConvert implements the generic Convert command // RunConvert implements the generic Convert command
func (o *ConvertOptions) RunConvert() error { 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(). b := o.builder().
WithScheme(scheme.Scheme). WithScheme(scheme.Scheme).
LocalParam(o.local) LocalParam(o.local)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment