diff --git a/pkg/apis/extensions/v1beta1/types.go b/pkg/apis/extensions/v1beta1/types.go index 8cb135ad0fe..9dfbc0e5d38 100644 --- a/pkg/apis/extensions/v1beta1/types.go +++ b/pkg/apis/extensions/v1beta1/types.go @@ -617,6 +617,7 @@ type ThirdPartyResourceDataList struct { // +genclient=true // Job represents the configuration of a single job. +// DEPRECATED: extensions/v1beta1.Job is deprecated, use batch/v1.Job instead. type Job struct { unversioned.TypeMeta `json:",inline"` // Standard object's metadata. @@ -636,6 +637,7 @@ type Job struct { } // JobList is a collection of jobs. +// DEPRECATED: extensions/v1beta1.JobList is deprecated, use batch/v1.JobList instead. type JobList struct { unversioned.TypeMeta `json:",inline"` // Standard list metadata diff --git a/pkg/kubectl/cmd/run.go b/pkg/kubectl/cmd/run.go index e8746fa16a7..ef4ca306c49 100644 --- a/pkg/kubectl/cmd/run.go +++ b/pkg/kubectl/cmd/run.go @@ -228,6 +228,9 @@ func Run(f cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer, cmd *cobr generatorName = "run-pod/v1" } } + if generatorName == "job/v1beta1" { + fmt.Fprintf(cmdErr, "DEPRECATED: --generator=job/v1beta1 is deprecated, use job/v1 instead.\n") + } generators := f.Generators("run") generator, found := generators[generatorName] if !found {