Currently the Azure kubectl task uses Kubectl version 1.13.xxx. Is there any way to run a newer version of kubectl that supports apply -k or kustomize?
Asked
Active
Viewed 1,376 times
1
-
Hi @Brad Vrabete Is there any update about this ticket? Feel free to let me know if the suggestion could give you some help. Just a remind of [this](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work). – Kevin Lu-MSFT May 27 '21 at 05:57
-
@KevinLu-MSFT indeed that worked like a charm. In the documentation it felt that the highest version possible is 1.13 so I did not try changing that to 1.21. I did now and it works like a charm (I was re-creating those steps manually, downloading and caching kubectl 1.21) – Brad Vrabete May 27 '21 at 07:30
-
Glad to know that it could work. If the answer could give you some help, you may consider accepting it as answer, thank you. – Kevin Lu-MSFT May 27 '21 at 07:31
-
On the other hand, you could refer to this doc :https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#software to confrim the pre-installed software. It contains kubectl 1.21.1 – Kevin Lu-MSFT May 27 '21 at 07:32
-
@KevinLu-MSFT in this particular case I was trying that for a local agent – Brad Vrabete May 28 '21 at 09:01
2 Answers
2
Is there any way to run a newer version of kubectl that supports apply -k or kustomize?
You could define the kubectl version in kbectl task -> Advanced tab
.
The default value is 1.13.2, you could change it to the required version.

Kevin Lu-MSFT
- 20,786
- 3
- 19
- 28
0
I'm not sure if this was an option when the question was originally asked, but for anyone stumbling across this question now Azure DevOps has a special "bake" task for applying kustomize templating

Sharebear
- 384
- 2
- 9