When executing locally, same kubectl version against the same aks cluster it works as expected with either '1' (single quotes), "1" (double quotes) or 1 (no quotes):
PS C:\Users\RM> kubectl version --short
Flag --short has been deprecated, and will be removed in the future. The --short output will become the default.
Client Version: v1.27.2
Kustomize Version: v5.0.1
Server Version: v1.24.15
PS C:\Users\RM> kubectl scale -n mynamespace --replicas="1" deployment/mydeployment
deployment.apps/mydeployment scaled
PS C:\Users\RM> kubectl scale -n mynamespace --replicas='1' deployment/mydeployment
deployment.apps/mydeployment scaled
Local environment:
Windows 11
PSVersion 5.1.22621.1778
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days
Task name
Kubernetes
Task version
1
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Windows 10
Task log
Relevant log output
Aditional info