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

Add support for "kubectl apply -k" in addition to "kustomize" #2431

Closed
poikilotherm opened this issue Jul 8, 2019 · 3 comments
Closed

Add support for "kubectl apply -k" in addition to "kustomize" #2431

poikilotherm opened this issue Jul 8, 2019 · 3 comments

Comments

@poikilotherm
Copy link

This is a feature request, not a bug report.

Currently, with v0.33.0 you can use either kubectl or kustomize deployer.
When a kustomization.yaml file is present, the kubectl deployer fails, as validation is failing (see also kubernetes-sigs/kustomize#738).

On the other hand, I need to install standalone kustomize binary for kustomize deployer, when I could as well use kubectl apply -k. These days, kustomize has been integrated into kubectl and should be available.

I request a feature that Skaffold is able to use kubectl apply -k, so less tools need to be installed to get people started. This might be safeguarded by looking at the kubectl version, giving a gracefull error message when an upgraded version or standalone installation is necessary.

Thank you!

@priyawadhwa
Copy link
Contributor

Hey @poikilotherm thanks for opening this feature request, you make some good points and I definitely agree it's an important feature to add. We have an open issue for this (#1781) and we are planning on getting to this soon! I'm going to close this issue as a dupe of the other one, but until we add this feature in you can work around it by specifying -k as an additional flag to pass to kubectl:

kubectl:
  flags:
    apply:
      - -
      - k

Here's the skaffold config reference for more info about specifying additional kubectl apply flags.

@poikilotherm
Copy link
Author

Sorry for the noise... I tried to search the issues for this but did not find that issue, maybe just overlooked it. Thx for pointing it out and adding the workaround 👍

@franxois
Copy link

Hey @poikilotherm thanks for opening this feature request, you make some good points and I definitely agree it's an important feature to add. We have an open issue for this (#1781) and we are planning on getting to this soon! I'm going to close this issue as a dupe of the other one, but until we add this feature in you can work around it by specifying -k as an additional flag to pass to kubectl:

kubectl:
  flags:
    apply:
      - -
      - k

Here's the skaffold config reference for more info about specifying additional kubectl apply flags.

Hi,
Thanks for the workaround, but for me ["-","k"] did works. I had to use

  kubectl:
    flags:
      global:
        - -k

Cleanup doesn't work, ends with :
error: only one of -f or -k can be specified

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

No branches or pull requests

3 participants