Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add kustomize --version and kubectl kustomize --version #1424

Closed
SleepyBrett opened this issue Aug 1, 2019 · 33 comments · Fixed by kubernetes/kubernetes#108817
Assignees

Comments

@SleepyBrett
Copy link

I just spent way to long trying to figure out why the examples in your repo don't work with kubectl kustomize. After finding a rejected MR trying to fix an example I determined that the resources: feature works the way that the examples show only in some versions of kustomize but it took me a while to find in the readme what version of kustomize is included in kubectl.

Alternatively if the flag is hard for whatever reason (I imagine the embedding in kubectl may cause some complication) perhaps the kustomize help screen could include the version number.

@richardmarshall
Copy link
Contributor

Add kustomize --version

For the independent kustomize tool version information is exposed via kustomize version in a format similar to kubectl version

For example:

$ kustomize version
Version: {KustomizeVersion:3.1.0 GitCommit:95f3303493fdea243ae83b767978092396169baf BuildDate:2019-07-26T18:11:16Z GoOs:darwin GoArch:amd64}

and kubectl kustomize --version

This would be a change in the kustomize sub-command in kubectl and so needs to be tracked in kubernetes/kubectl. Having this has come up on slack a few times and you're not the first to open a related issue (#1267) so a feature request there would be welcome.

I just spent way to long trying to figure out why the examples in your repo don't work with kubectl kustomize.

Having more a prominent call out in the README for information relating to the kubectl integration and where to go for examples/docs specific to that would definitely help prevent others running into this as well.

For example these references:

@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 31, 2019
@george-angel
Copy link
Contributor

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 22, 2019
@jobevers
Copy link

Currently, the kustomize version bundled with kubectl is 2.0.3.

For better or worse, this is the second hit for me on google when I search for kubectl kustomize version. So, I'm trying to be helpful for future visitors.

I'm not sure if its possible to check on the command line, but there is currently a note on the README page in this repo that says which versions are included in kubectl:
https://github.com/kubernetes-sigs/kustomize#kubectl-integration

@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 9, 2020
@george-angel
Copy link
Contributor

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 9, 2020
@davesteinberg
Copy link

And now the table in the kustomize README is out of date: kubectl 1.18.x has been out for about a month. I have no idea if it's still stuck at kustomize 2.0.3. That's probably the safest guess.

@Jojoooo1
Copy link

Probably I had problem when using patch command...

@grazius
Copy link

grazius commented May 5, 2020

Hello
What version of kustomize is included in kubectl 1.18.2 ?

@der-ali
Copy link

der-ali commented May 25, 2020

+1

@gmarco
Copy link

gmarco commented Jun 8, 2020

I was searching also for the current version of kustomize.
It is still

{
"ImportPath": "sigs.k8s.io/kustomize",
"Rev": "v2.0.3"
},

You can find this on https://github.com/kubernetes/kubectl/blob/v0.18.3/Godeps/Godeps.json

@marshallford
Copy link

As a new kustomize user this was definitely confusing. The jump from 2.x to 3.x is important to be aware of.

@dijitali
Copy link

dijitali commented Aug 4, 2020

Just for anyone still getting caught out by this, judging by related issues of #1500, I think there may be on-going work in #2668 and #2675 that is going to progress this.

@numbsafari
Copy link

Is the integration with kubectl no longer maintained? It seems unclear what the status of that is based on the version drift that is occurring.

@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 19, 2020
@ThisIsQasim
Copy link

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 19, 2020
@Shell32-Natsu
Copy link
Contributor

We cannot work on this before we re-integrate the kustomize with kubectl. The re-integration is covered by #1500 and #2506

@fejta-bot
Copy link

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-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 17, 2021
@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 17, 2021
@eddiezane
Copy link
Member

/cc

@KnVerey
Copy link
Contributor

KnVerey commented May 26, 2021

Now that we've also updated to Go 1.16, I think embed could be used as part of the solution here.

cc @jeremyrickard

@KnVerey KnVerey mentioned this issue Jun 2, 2021
6 tasks
@efrainsteinbach
Copy link

apparently, kubectl v1.21 is out now.. has anything changed?
The kustomize FAQ page says that the version should be updated in ~v1.20 https://kubectl.docs.kubernetes.io/faq/kustomize/
If it has changed, it'd be great if the readme.md was updated accordingly.

@KnVerey
Copy link
Contributor

KnVerey commented Jun 15, 2021

Yes, it was updated in 1.21: https://github.com/kubernetes/kubernetes/blob/4d75a6238a6e330337526e0513e67d02b1940b63/CHANGELOG/CHANGELOG-1.21.md#kustomize-updates-in-kubectl

Yes, both the readme and docs need to be updated

@diclophis
Copy link

If anyone is wondering about their ubuntu package version I think the ubuntu package might be a bit broken...

~) $ kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:59:11Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"linux/amd64"}
~) $ kubectl kustomize version
Error: evalsymlink failure on 'version' : lstat /home/myself/version: no such file or directory

^ I don't think that is correct ...

~) $ kubectl kustomize --version
Error: unknown flag: --version
See 'kubectl kustomize --help' for usage.
~) $ dpkg -l | grep kubectl
ii  kubectl                                    1.21.2-00                                        amd64        Kubernetes Command Line Tool
kubectl |  1.21.2-00 | http://apt.kubernetes.io kubernetes-xenial/main amd64 Packages

@KnVerey
Copy link
Contributor

KnVerey commented Jun 22, 2021

@diclophis that's because no such version command exists, neither as a subcommand nor a flag. That's what this issue is tracking. In kubectl kustomize version, "version" is being interpreted as a path.

@KnVerey
Copy link
Contributor

KnVerey commented Jun 22, 2021

/assign @jeremyrickard

@foobarbecue
Copy link

Workaround? How can we check what version of kustomize kubectl is using?

@KnVerey
Copy link
Contributor

KnVerey commented Jul 26, 2021

For now you'll have to check the Kustomize readme:

https://github.com/kubernetes-sigs/kustomize#kubectl-integration

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 24, 2021
@KnVerey KnVerey removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 25, 2021
@pierluigilenoci
Copy link

@jeremyrickard any news?

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 23, 2022
@pierluigilenoci
Copy link

@jeremyrickard could you please take a look?

@Koshmaar
Copy link

Strange, also have this problem on Ubuntu, that Kustomize version is old even though I have kubectl 1.23:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.2", GitCommit:"9d142434e3af351a628bffee3939e64c681afa4d", GitTreeState:"clean", BuildDate:"2022-01-21T02:20:54Z", GoVersion:"go1.17.6", Compiler:"gc", Platform:"linux/amd64"}
$ kubectl kustomize edit set image foo=bar:0.0.1
error: specify one path to kustomization.yaml

This command should be working in newer kustomize. Another thing, I also think it's rather strange that such basic functionality as being able to check the version of component is unavailable for such long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet