mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Remove deprecated kubectl command aliases
This commit is contained in:
		@@ -21,7 +21,6 @@ docs/man/man1/kube-scheduler.1
 | 
				
			|||||||
docs/man/man1/kubectl-alpha.1
 | 
					docs/man/man1/kubectl-alpha.1
 | 
				
			||||||
docs/man/man1/kubectl-annotate.1
 | 
					docs/man/man1/kubectl-annotate.1
 | 
				
			||||||
docs/man/man1/kubectl-api-versions.1
 | 
					docs/man/man1/kubectl-api-versions.1
 | 
				
			||||||
docs/man/man1/kubectl-apiversions.1
 | 
					 | 
				
			||||||
docs/man/man1/kubectl-apply-edit-last-applied.1
 | 
					docs/man/man1/kubectl-apply-edit-last-applied.1
 | 
				
			||||||
docs/man/man1/kubectl-apply-set-last-applied.1
 | 
					docs/man/man1/kubectl-apply-set-last-applied.1
 | 
				
			||||||
docs/man/man1/kubectl-apply-view-last-applied.1
 | 
					docs/man/man1/kubectl-apply-view-last-applied.1
 | 
				
			||||||
@@ -35,8 +34,6 @@ docs/man/man1/kubectl-certificate-deny.1
 | 
				
			|||||||
docs/man/man1/kubectl-certificate.1
 | 
					docs/man/man1/kubectl-certificate.1
 | 
				
			||||||
docs/man/man1/kubectl-cluster-info-dump.1
 | 
					docs/man/man1/kubectl-cluster-info-dump.1
 | 
				
			||||||
docs/man/man1/kubectl-cluster-info.1
 | 
					docs/man/man1/kubectl-cluster-info.1
 | 
				
			||||||
docs/man/man1/kubectl-clusterinfo-dump.1
 | 
					 | 
				
			||||||
docs/man/man1/kubectl-clusterinfo.1
 | 
					 | 
				
			||||||
docs/man/man1/kubectl-completion.1
 | 
					docs/man/man1/kubectl-completion.1
 | 
				
			||||||
docs/man/man1/kubectl-config-current-context.1
 | 
					docs/man/man1/kubectl-config-current-context.1
 | 
				
			||||||
docs/man/man1/kubectl-config-delete-cluster.1
 | 
					docs/man/man1/kubectl-config-delete-cluster.1
 | 
				
			||||||
@@ -91,16 +88,13 @@ docs/man/man1/kubectl-plugin.1
 | 
				
			|||||||
docs/man/man1/kubectl-port-forward.1
 | 
					docs/man/man1/kubectl-port-forward.1
 | 
				
			||||||
docs/man/man1/kubectl-proxy.1
 | 
					docs/man/man1/kubectl-proxy.1
 | 
				
			||||||
docs/man/man1/kubectl-replace.1
 | 
					docs/man/man1/kubectl-replace.1
 | 
				
			||||||
docs/man/man1/kubectl-resize.1
 | 
					 | 
				
			||||||
docs/man/man1/kubectl-rolling-update.1
 | 
					docs/man/man1/kubectl-rolling-update.1
 | 
				
			||||||
docs/man/man1/kubectl-rollingupdate.1
 | 
					 | 
				
			||||||
docs/man/man1/kubectl-rollout-history.1
 | 
					docs/man/man1/kubectl-rollout-history.1
 | 
				
			||||||
docs/man/man1/kubectl-rollout-pause.1
 | 
					docs/man/man1/kubectl-rollout-pause.1
 | 
				
			||||||
docs/man/man1/kubectl-rollout-resume.1
 | 
					docs/man/man1/kubectl-rollout-resume.1
 | 
				
			||||||
docs/man/man1/kubectl-rollout-status.1
 | 
					docs/man/man1/kubectl-rollout-status.1
 | 
				
			||||||
docs/man/man1/kubectl-rollout-undo.1
 | 
					docs/man/man1/kubectl-rollout-undo.1
 | 
				
			||||||
docs/man/man1/kubectl-rollout.1
 | 
					docs/man/man1/kubectl-rollout.1
 | 
				
			||||||
docs/man/man1/kubectl-run-container.1
 | 
					 | 
				
			||||||
docs/man/man1/kubectl-run.1
 | 
					docs/man/man1/kubectl-run.1
 | 
				
			||||||
docs/man/man1/kubectl-scale.1
 | 
					docs/man/man1/kubectl-scale.1
 | 
				
			||||||
docs/man/man1/kubectl-set-image.1
 | 
					docs/man/man1/kubectl-set-image.1
 | 
				
			||||||
@@ -114,7 +108,6 @@ docs/man/man1/kubectl-top-node.1
 | 
				
			|||||||
docs/man/man1/kubectl-top-pod.1
 | 
					docs/man/man1/kubectl-top-pod.1
 | 
				
			||||||
docs/man/man1/kubectl-top.1
 | 
					docs/man/man1/kubectl-top.1
 | 
				
			||||||
docs/man/man1/kubectl-uncordon.1
 | 
					docs/man/man1/kubectl-uncordon.1
 | 
				
			||||||
docs/man/man1/kubectl-update.1
 | 
					 | 
				
			||||||
docs/man/man1/kubectl-version.1
 | 
					docs/man/man1/kubectl-version.1
 | 
				
			||||||
docs/man/man1/kubectl.1
 | 
					docs/man/man1/kubectl.1
 | 
				
			||||||
docs/man/man1/kubelet.1
 | 
					docs/man/man1/kubelet.1
 | 
				
			||||||
@@ -212,14 +205,12 @@ docs/yaml/kubectl/kubectl.yaml
 | 
				
			|||||||
docs/yaml/kubectl/kubectl_alpha.yaml
 | 
					docs/yaml/kubectl/kubectl_alpha.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_annotate.yaml
 | 
					docs/yaml/kubectl/kubectl_annotate.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_api-versions.yaml
 | 
					docs/yaml/kubectl/kubectl_api-versions.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_apiversions.yaml
 | 
					 | 
				
			||||||
docs/yaml/kubectl/kubectl_apply.yaml
 | 
					docs/yaml/kubectl/kubectl_apply.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_attach.yaml
 | 
					docs/yaml/kubectl/kubectl_attach.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_auth.yaml
 | 
					docs/yaml/kubectl/kubectl_auth.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_autoscale.yaml
 | 
					docs/yaml/kubectl/kubectl_autoscale.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_certificate.yaml
 | 
					docs/yaml/kubectl/kubectl_certificate.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_cluster-info.yaml
 | 
					docs/yaml/kubectl/kubectl_cluster-info.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_clusterinfo.yaml
 | 
					 | 
				
			||||||
docs/yaml/kubectl/kubectl_completion.yaml
 | 
					docs/yaml/kubectl/kubectl_completion.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_config.yaml
 | 
					docs/yaml/kubectl/kubectl_config.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_convert.yaml
 | 
					docs/yaml/kubectl/kubectl_convert.yaml
 | 
				
			||||||
@@ -242,11 +233,8 @@ docs/yaml/kubectl/kubectl_plugin.yaml
 | 
				
			|||||||
docs/yaml/kubectl/kubectl_port-forward.yaml
 | 
					docs/yaml/kubectl/kubectl_port-forward.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_proxy.yaml
 | 
					docs/yaml/kubectl/kubectl_proxy.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_replace.yaml
 | 
					docs/yaml/kubectl/kubectl_replace.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_resize.yaml
 | 
					 | 
				
			||||||
docs/yaml/kubectl/kubectl_rolling-update.yaml
 | 
					docs/yaml/kubectl/kubectl_rolling-update.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_rollingupdate.yaml
 | 
					 | 
				
			||||||
docs/yaml/kubectl/kubectl_rollout.yaml
 | 
					docs/yaml/kubectl/kubectl_rollout.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_run-container.yaml
 | 
					 | 
				
			||||||
docs/yaml/kubectl/kubectl_run.yaml
 | 
					docs/yaml/kubectl/kubectl_run.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_scale.yaml
 | 
					docs/yaml/kubectl/kubectl_scale.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_set.yaml
 | 
					docs/yaml/kubectl/kubectl_set.yaml
 | 
				
			||||||
@@ -254,5 +242,4 @@ docs/yaml/kubectl/kubectl_stop.yaml
 | 
				
			|||||||
docs/yaml/kubectl/kubectl_taint.yaml
 | 
					docs/yaml/kubectl/kubectl_taint.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_top.yaml
 | 
					docs/yaml/kubectl/kubectl_top.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_uncordon.yaml
 | 
					docs/yaml/kubectl/kubectl_uncordon.yaml
 | 
				
			||||||
docs/yaml/kubectl/kubectl_update.yaml
 | 
					 | 
				
			||||||
docs/yaml/kubectl/kubectl_version.yaml
 | 
					docs/yaml/kubectl/kubectl_version.yaml
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
This file is autogenerated, but we've stopped checking such files into the
 | 
					 | 
				
			||||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
 | 
					 | 
				
			||||||
populate this file.
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
This file is autogenerated, but we've stopped checking such files into the
 | 
					 | 
				
			||||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
 | 
					 | 
				
			||||||
populate this file.
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
This file is autogenerated, but we've stopped checking such files into the
 | 
					 | 
				
			||||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
 | 
					 | 
				
			||||||
populate this file.
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
This file is autogenerated, but we've stopped checking such files into the
 | 
					 | 
				
			||||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
 | 
					 | 
				
			||||||
populate this file.
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
This file is autogenerated, but we've stopped checking such files into the
 | 
					 | 
				
			||||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
 | 
					 | 
				
			||||||
populate this file.
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
This file is autogenerated, but we've stopped checking such files into the
 | 
					 | 
				
			||||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
 | 
					 | 
				
			||||||
populate this file.
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
This file is autogenerated, but we've stopped checking such files into the
 | 
					 | 
				
			||||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
 | 
					 | 
				
			||||||
populate this file.
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
This file is autogenerated, but we've stopped checking such files into the
 | 
					 | 
				
			||||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
 | 
					 | 
				
			||||||
populate this file.
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
This file is autogenerated, but we've stopped checking such files into the
 | 
					 | 
				
			||||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
 | 
					 | 
				
			||||||
populate this file.
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
This file is autogenerated, but we've stopped checking such files into the
 | 
					 | 
				
			||||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
 | 
					 | 
				
			||||||
populate this file.
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
This file is autogenerated, but we've stopped checking such files into the
 | 
					 | 
				
			||||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
 | 
					 | 
				
			||||||
populate this file.
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
This file is autogenerated, but we've stopped checking such files into the
 | 
					 | 
				
			||||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
 | 
					 | 
				
			||||||
populate this file.
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
This file is autogenerated, but we've stopped checking such files into the
 | 
					 | 
				
			||||||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
 | 
					 | 
				
			||||||
populate this file.
 | 
					 | 
				
			||||||
@@ -1222,31 +1222,6 @@ run_kubectl_run_tests() {
 | 
				
			|||||||
  set +o errexit
 | 
					  set +o errexit
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
run_kubectl_using_deprecated_commands_test() {
 | 
					 | 
				
			||||||
  set -o nounset
 | 
					 | 
				
			||||||
  set -o errexit
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  create_and_use_new_namespace
 | 
					 | 
				
			||||||
  kube::log::status "Testing kubectl using deprecated commands"
 | 
					 | 
				
			||||||
  ## `kubectl run-container` should function identical to `kubectl run`, but it
 | 
					 | 
				
			||||||
  ## should also print a deprecation warning.
 | 
					 | 
				
			||||||
  # Pre-Condition: no Job exists
 | 
					 | 
				
			||||||
  kube::test::get_object_assert jobs "{{range.items}}{{$id_field}}:{{end}}" ''
 | 
					 | 
				
			||||||
  # Command
 | 
					 | 
				
			||||||
  output_message=$(kubectl 2>&1 run-container pi --generator=job/v1 "--image=$IMAGE_PERL" --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(15)' "${kube_flags[@]}")
 | 
					 | 
				
			||||||
  # Ensure that the user is warned their command is deprecated.
 | 
					 | 
				
			||||||
  kube::test::if_has_string "${output_message}" 'deprecated'
 | 
					 | 
				
			||||||
  # Post-Condition: Job "pi" is created
 | 
					 | 
				
			||||||
  kube::test::get_object_assert jobs "{{range.items}}{{$id_field}}:{{end}}" 'pi:'
 | 
					 | 
				
			||||||
  # Clean up
 | 
					 | 
				
			||||||
  kubectl delete jobs pi "${kube_flags[@]}"
 | 
					 | 
				
			||||||
  # Post-condition: no pods exist.
 | 
					 | 
				
			||||||
  kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" ''
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  set +o nounset
 | 
					 | 
				
			||||||
  set +o errexit
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
run_kubectl_get_tests() {
 | 
					run_kubectl_get_tests() {
 | 
				
			||||||
  set -o nounset
 | 
					  set -o nounset
 | 
				
			||||||
  set -o errexit
 | 
					  set -o errexit
 | 
				
			||||||
@@ -4279,7 +4254,6 @@ runTests() {
 | 
				
			|||||||
    # run for federation apiserver as well.
 | 
					    # run for federation apiserver as well.
 | 
				
			||||||
    record_command run_kubectl_apply_tests
 | 
					    record_command run_kubectl_apply_tests
 | 
				
			||||||
    record_command run_kubectl_run_tests
 | 
					    record_command run_kubectl_run_tests
 | 
				
			||||||
    record_command run_kubectl_using_deprecated_commands_test
 | 
					 | 
				
			||||||
    record_command run_kubectl_create_filter_tests
 | 
					    record_command run_kubectl_create_filter_tests
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -285,7 +285,6 @@ func NewKubectlCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer) *cob
 | 
				
			|||||||
				NewCmdCreate(f, out, err),
 | 
									NewCmdCreate(f, out, err),
 | 
				
			||||||
				NewCmdExposeService(f, out),
 | 
									NewCmdExposeService(f, out),
 | 
				
			||||||
				NewCmdRun(f, in, out, err),
 | 
									NewCmdRun(f, in, out, err),
 | 
				
			||||||
				deprecatedAlias("run-container", NewCmdRun(f, in, out, err)),
 | 
					 | 
				
			||||||
				set.NewCmdSet(f, out, err),
 | 
									set.NewCmdSet(f, out, err),
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
@@ -303,9 +302,7 @@ func NewKubectlCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer) *cob
 | 
				
			|||||||
			Commands: []*cobra.Command{
 | 
								Commands: []*cobra.Command{
 | 
				
			||||||
				rollout.NewCmdRollout(f, out, err),
 | 
									rollout.NewCmdRollout(f, out, err),
 | 
				
			||||||
				NewCmdRollingUpdate(f, out),
 | 
									NewCmdRollingUpdate(f, out),
 | 
				
			||||||
				deprecatedAlias("rollingupdate", NewCmdRollingUpdate(f, out)),
 | 
					 | 
				
			||||||
				NewCmdScale(f, out),
 | 
									NewCmdScale(f, out),
 | 
				
			||||||
				deprecatedAlias("resize", NewCmdScale(f, out)),
 | 
					 | 
				
			||||||
				NewCmdAutoscale(f, out),
 | 
									NewCmdAutoscale(f, out),
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
@@ -314,7 +311,6 @@ func NewKubectlCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer) *cob
 | 
				
			|||||||
			Commands: []*cobra.Command{
 | 
								Commands: []*cobra.Command{
 | 
				
			||||||
				NewCmdCertificate(f, out),
 | 
									NewCmdCertificate(f, out),
 | 
				
			||||||
				NewCmdClusterInfo(f, out),
 | 
									NewCmdClusterInfo(f, out),
 | 
				
			||||||
				deprecatedAlias("clusterinfo", NewCmdClusterInfo(f, out)),
 | 
					 | 
				
			||||||
				NewCmdTop(f, out, err),
 | 
									NewCmdTop(f, out, err),
 | 
				
			||||||
				NewCmdCordon(f, out),
 | 
									NewCmdCordon(f, out),
 | 
				
			||||||
				NewCmdUncordon(f, out),
 | 
									NewCmdUncordon(f, out),
 | 
				
			||||||
@@ -341,7 +337,6 @@ func NewKubectlCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer) *cob
 | 
				
			|||||||
				NewCmdApply("kubectl", f, out, err),
 | 
									NewCmdApply("kubectl", f, out, err),
 | 
				
			||||||
				NewCmdPatch(f, out),
 | 
									NewCmdPatch(f, out),
 | 
				
			||||||
				NewCmdReplace(f, out),
 | 
									NewCmdReplace(f, out),
 | 
				
			||||||
				deprecatedAlias("update", NewCmdReplace(f, out)),
 | 
					 | 
				
			||||||
				NewCmdConvert(f, out),
 | 
									NewCmdConvert(f, out),
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
@@ -386,7 +381,6 @@ func NewKubectlCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer) *cob
 | 
				
			|||||||
	cmds.AddCommand(NewCmdPlugin(f, in, out, err))
 | 
						cmds.AddCommand(NewCmdPlugin(f, in, out, err))
 | 
				
			||||||
	cmds.AddCommand(NewCmdVersion(f, out))
 | 
						cmds.AddCommand(NewCmdVersion(f, out))
 | 
				
			||||||
	cmds.AddCommand(NewCmdApiVersions(f, out))
 | 
						cmds.AddCommand(NewCmdApiVersions(f, out))
 | 
				
			||||||
	cmds.AddCommand(deprecatedAlias("apiversions", NewCmdApiVersions(f, out)))
 | 
					 | 
				
			||||||
	cmds.AddCommand(NewCmdOptions(out))
 | 
						cmds.AddCommand(NewCmdOptions(out))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return cmds
 | 
						return cmds
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user