The initial kubectl convert deprecation was announced prior to release 1.13. Following the Kubernetes deprecation policy, this kubectl subcommand is now eligible to be removed in release 1.17. The following are options for next steps as this convert functionality is removed from kubectl. If you have an opinion, please add comments to this issue so that we can quickly drive consensus and make a decision on which option we will pursue.
We could move the kubectl convert code into a plugin named kubectl-convert. The invocation of the plugin would mimic the current command: kubectl convert.
kubectl-convert will ensure kubectl users can type the same command: kubectl convert.kubectl convert subcommand code./sig cli
/sig api-machinery
/area kubectl
/kind cleanup
@seans3: The label(s) sig/apimachinery cannot be applied. These labels are supported: api-review, community/discussion, community/maintenance, community/question, cuj/build-train-deploy, cuj/multi-user, platform/aws, platform/azure, platform/gcp, platform/minikube, platform/other
In response to this:
/sig cli
/sig apimachinery
/area kubectl
/kind cleanup
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/assign @liggitt
/assign @deads2k
/assign @soltysh
/assign @pwittrock
I think some of this going to come down on jordan, myself, and Daniel agreeing on the role of staging. I see it as a way to organize our components and some aspects of it are valid to depend upon (client-go and api for instance) and others makes less sense (a kube-controller-manager or kube-apiserver). I think building a separate command that lives near our internal APIs make sense and I'd rather do that that coerce it into a kube-apiserver subcommand. Doing that would give a cleaner example to others trying to build a similar thing (think of the position cert-manager is in today).
Discussed this in the code organization call yesterday.
The Convert as a Binary option seemed like the best immediate step to unblock this. Placing the command within the k8s.io/kubernetes/cmd package to begin with would give it access to the internal types/conversions without needing to vendor anything. When the discussion about moving those types/conversions to staging is settled, the command could be moved to staging along with them, if desired.
(note that this differs from the Convert as a Plugin option only by the name of the command chosen... if we named the command kubectl-convert, and kept the invocation consistent with the current invocation, we would effectively have created a command that could be used as a plugin, if desired, or standalone)
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
@fejta-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity.
Reopen the issue with/reopen.
Mark the issue as fresh with/remove-lifecycle rotten.Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/reopen
/remove-lifecycle rottem
/lifecycle frozen
@soltysh: Reopened this issue.
In response to this:
/reopen
/remove-lifecycle rottem
/lifecycle frozen
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Even if we'll have to install something extra, glad to see this command will remain available and without making a request to the API service (right?)
/priority important-soon
just curious, why is convert deprecated?
convert contains inappropriate dependencies. convert necessarily depends on internal types (in order to convert), but kubectl should not depend on these. In fact, no software outside api server should depend on internal types.
The deprecation plan is to create convert as a plugin or separate binary. So the functionality would still exist; just not in kubectl.
Hey guys, where can I find the convert plugin ?
when i use Krew and do the kubectl krew search i dont see it in the list. Was this plugin released ?
@angadrandhawa I don't know where the binary is, but you can build from the source code:
go get -u k8s.io/kubernetes/cmd/kubectl-convert
I'm missing the kubectl convert feature, cannot find a plugin or binary. I need it to upgrade from 1.15. The command above does not work anymore. Please advise.
Yeah, apologies for that we missed that bit in the last release, there will be binaries available in the upcoming 1.21 version and I'm planning to include them in the krew for ease of use.
I'm missing the kubectl convert feature, cannot find a plugin or binary. I need it to upgrade from 1.15. The command above does not work anymore. Please advise.
In Konveyor Move2Kube we had added the conversion capability for kubernetes yamls. After installing move2kube BLEEDING_EDGE='true' bash <(curl https://raw.githubusercontent.com/konveyor/move2kube/main/scripts/install.sh), You will have to do move2kube translate -s <folder containing your k8s yamls>. If you are interested in specific kubernetes api resource verisons, you can create a cluster.yaml file, and edit the intended versions, and then add it to the same folder as your source, and move2kube will migrate your yamls to those specific versions.
If you would want to get the versions in a specific cluster, set it in context for your kubectl and then run move2kube collect, and a cluster yaml file will be created for your cluster in m2k_collect folder, which you can then add to the source folder.
This could be a stop gap solution till kubectl convert is released in 1.21 as @soltysh has mentioned.
Hope it helps.
I'm running
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-12T14:18:45Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}
...and I can't use this command.
I'm confused, how do I use this? I have no clue yet how I migrate my deployments from extensions/v1beta1 to apps/v1. Amazon EKS update guide suggested to use this tool.
I also tried installing it from source, but got this error:
$ go get -u k8s.io/kubernetes/cmd/kubectl-convert
go get: k8s.io/[email protected] updating to
k8s.io/[email protected] requires
k8s.io/[email protected]: reading k8s.io/apiextensions-apiserver/go.mod at revision v0.0.0: unknown revision v0.0.0
Most helpful comment
Yeah, apologies for that we missed that bit in the last release, there will be binaries available in the upcoming 1.21 version and I'm planning to include them in the krew for ease of use.