What happened?
Task that fails:
- task: Kubernetes@1
inputs:
connectionType: 'Kubernetes Service Connection'
kubernetesServiceEndpoint: 'Unify-Pipeline Kubernetes Service'
namespace: '$(NAMESPACE)'
command: 'create'
arguments: ' --docker-password=$(REGISTRY_PWD) --docker-username=$(REGISTRY_USER) --docker-email=pline@mydomain.ltd --docker-server=$(REGISTRY_NAME)'
secretType: 'dockerRegistry'
containerRegistryType: 'Container Registry'
dockerRegistryEndpoint: 'Rancher Docker Registry'
secretName: 'regcred'
Starting: Kubernetes
==============================================================================
Task : Kubectl
Description : Deploy, configure, update a Kubernetes cluster in Azure Container Service by running kubectl commands
Version : 1.227.0
Author : Microsoft Corporation
Help : https://aka.ms/azpipes-kubectl-tsg
==============================================================================
(node:23972) [DEP0106] DeprecationWarning: crypto.createCipher is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:23972) Warning: Use Cipheriv for counter mode of aes-256-ctr
==============================================================================
Kubectl Client Version: v1.8.9
Kubectl Server Version: v1.33.5+rke2r1
==============================================================================
C:\build_agent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe -n ***-unify create secret docker-registry regcred --docker-server=*** --docker-username=*** --docker-password= --docker-email=
error: flag docker-password is required
See 'kubectl create secret docker-registry -h' for help and examples.
##[error]The process 'C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe' failed with exit code 1
Finishing: Kubernetes
I've tried creating the secret with the --from-file=.dockerconfigjson=.docker/config.json, where it complains about missing parameters also. The credentials in this file are a base64 string. But, I'm filing this bug because I can't create a secret. Please make this make sense.
The variables are defined, and it doesn't matter if they are plaintext or variables the error occurs.
Versions
Agent Version: 3.255.0 / Windows 11
I've found this version of the agent to be compatible with the server until now.
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
Azure DevOps Server (Please specify exact version in the textbox below)
Azure DevOps Server Version (if applicable)
Azure Devops 2022.2 (AzureDevopsServer_20240806.7)
Operation system
Windows Server 2019
Version controll system
git
Relevant log output
2025-12-03T04:37:12.0219365Z ##[debug]Evaluating condition for step: 'Kubernetes'
2025-12-03T04:37:12.0220385Z ##[debug]Evaluating: SucceededNode()
2025-12-03T04:37:12.0220594Z ##[debug]Evaluating SucceededNode:
2025-12-03T04:37:12.0220959Z ##[debug]=> True
2025-12-03T04:37:12.0221200Z ##[debug]Result: True
2025-12-03T04:37:12.0221461Z ##[section]Starting: Kubernetes
2025-12-03T04:37:12.0227876Z ==============================================================================
2025-12-03T04:37:12.0227975Z Task : Kubectl
2025-12-03T04:37:12.0228034Z Description : Deploy, configure, update a Kubernetes cluster in Azure Container Service by running kubectl commands
2025-12-03T04:37:12.0228149Z Version : 1.227.0
2025-12-03T04:37:12.0228200Z Author : Microsoft Corporation
2025-12-03T04:37:12.0228266Z Help : https://aka.ms/azpipes-kubectl-tsg
2025-12-03T04:37:12.0228331Z ==============================================================================
2025-12-03T04:37:12.0558464Z ##[debug]Resource Utilization warnings is disabled, switch "DISABLE_RESOURCE_UTILIZATION_WARNINGS" variable to "false" if you want to enable it
2025-12-03T04:37:12.0587996Z ##[debug]Using node path: C:\azagent\externals\node16\bin\node.exe
2025-12-03T04:37:13.6731535Z ##[debug]agent.TempDirectory=C:\azagent\_work\_temp
2025-12-03T04:37:13.6744889Z ##[debug]loading inputs and endpoints
2025-12-03T04:37:13.6751360Z ##[debug]loading ENDPOINT_AUTH_4d05f501-19db-4b80-94be-78c95176ab3a
2025-12-03T04:37:13.6838764Z ##[debug]loading ENDPOINT_AUTH_fec823f0-650a-45e2-919c-221c1733bc5f
2025-12-03T04:37:13.6841522Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_4d05f501-19db-4b80-94be-78c95176ab3a_REGISTRY
2025-12-03T04:37:13.6843547Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_4d05f501-19db-4b80-94be-78c95176ab3a_USERNAME
2025-12-03T04:37:13.6845816Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_fec823f0-650a-45e2-919c-221c1733bc5f_CLUSTERCONTEXT
2025-12-03T04:37:13.6847805Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_fec823f0-650a-45e2-919c-221c1733bc5f_KUBECONFIG
2025-12-03T04:37:13.6851137Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2025-12-03T04:37:13.6853491Z ##[debug]loading ENDPOINT_AUTH_SCHEME_4d05f501-19db-4b80-94be-78c95176ab3a
2025-12-03T04:37:13.6856288Z ##[debug]loading ENDPOINT_AUTH_SCHEME_fec823f0-650a-45e2-919c-221c1733bc5f
2025-12-03T04:37:13.6858934Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2025-12-03T04:37:13.6862079Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2025-12-03T04:37:13.6866173Z ##[debug]loading INPUT_ARGUMENTS
2025-12-03T04:37:13.6869412Z ##[debug]loading INPUT_CHECKLATEST
2025-12-03T04:37:13.6872198Z ##[debug]loading INPUT_COMMAND
2025-12-03T04:37:13.6874335Z ##[debug]loading INPUT_CONFIGMAPFILE
2025-12-03T04:37:13.6876070Z ##[debug]loading INPUT_CONFIGURATION
2025-12-03T04:37:13.6877943Z ##[debug]loading INPUT_CONFIGURATIONTYPE
2025-12-03T04:37:13.6879486Z ##[debug]loading INPUT_CONNECTIONTYPE
2025-12-03T04:37:13.6881400Z ##[debug]loading INPUT_CONTAINERREGISTRYTYPE
2025-12-03T04:37:13.6882982Z ##[debug]loading INPUT_CWD
2025-12-03T04:37:13.6885979Z ##[debug]loading INPUT_DOCKERREGISTRYENDPOINT
2025-12-03T04:37:13.6888063Z ##[debug]loading INPUT_FORCEUPDATE
2025-12-03T04:37:13.6889440Z ##[debug]loading INPUT_FORCEUPDATECONFIGMAP
2025-12-03T04:37:13.6891047Z ##[debug]loading INPUT_KUBERNETESSERVICEENDPOINT
2025-12-03T04:37:13.6893574Z ##[debug]loading INPUT_NAMESPACE
2025-12-03T04:37:13.6895436Z ##[debug]loading INPUT_OUTPUTFORMAT
2025-12-03T04:37:13.6897378Z ##[debug]loading INPUT_SECRETNAME
2025-12-03T04:37:13.6898738Z ##[debug]loading INPUT_SECRETTYPE
2025-12-03T04:37:13.6900245Z ##[debug]loading INPUT_SPECIFYLOCATION
2025-12-03T04:37:13.6902048Z ##[debug]loading INPUT_USECLUSTERADMIN
2025-12-03T04:37:13.6903619Z ##[debug]loading INPUT_USECONFIGMAPFILE
2025-12-03T04:37:13.6905371Z ##[debug]loading INPUT_USECONFIGURATIONFILE
2025-12-03T04:37:13.6906830Z ##[debug]loading INPUT_VERSIONORLOCATION
2025-12-03T04:37:13.6908593Z ##[debug]loading INPUT_VERSIONSPEC
2025-12-03T04:37:13.6911970Z ##[debug]loading SECRET_AGENT_CLIENTCERTPASSWORD
2025-12-03T04:37:13.6913894Z ##[debug]loading SECRET_PAT_PLINE
2025-12-03T04:37:13.6915842Z ##[debug]loading SECRET_REGISTRY_PWD
2025-12-03T04:37:13.6917496Z ##[debug]loading SECRET_REGISTRY_USER
2025-12-03T04:37:13.6919491Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2025-12-03T04:37:13.6925137Z ##[debug]loaded 39
2025-12-03T04:37:13.6931083Z ##[debug]Agent.ProxyUrl=undefined
2025-12-03T04:37:13.6931819Z ##[debug]Agent.CAInfo=undefined
2025-12-03T04:37:13.6932164Z ##[debug]Agent.ClientCert=C:\azagent\signed-***-devops.crt
2025-12-03T04:37:13.6932482Z ##[debug]Agent.ClientCertKey=C:\azagent\signed-***-devops.key
2025-12-03T04:37:13.6932790Z ##[debug]Agent.ClientCertArchive=C:\azagent\***-devops.pfx
2025-12-03T04:37:13.6936573Z ##[debug]Agent.ClientCertPassword=***
2025-12-03T04:37:13.6940361Z ##[debug]Agent.TempDirectory=C:\azagent\_work\_temp
2025-12-03T04:37:13.6955109Z ##[debug]expose agent certificate configuration.
2025-12-03T04:37:13.6955643Z ##[debug]Agent.SkipCertValidation=undefined
2025-12-03T04:37:14.1257402Z ##[debug]Agent.ProxyUrl=undefined
2025-12-03T04:37:14.1258219Z ##[debug]Agent.CAInfo=undefined
2025-12-03T04:37:14.1258595Z ##[debug]Agent.ClientCert=C:\azagent\signed-***-devops.crt
2025-12-03T04:37:14.1258928Z ##[debug]Agent.ClientCertKey=C:\azagent\signed-***-devops.key
2025-12-03T04:37:14.1259237Z ##[debug]Agent.ClientCertArchive=C:\azagent\***-devops.pfx
2025-12-03T04:37:14.1262056Z ##[debug]Agent.ClientCertPassword=***
2025-12-03T04:37:14.1263351Z ##[debug]check path : C:\azagent\_work\_tasks\Kubernetes_cbc316a2-586f-4def-be79-488a1f503564\1.227.0\node_modules\azure-pipelines-tool-lib\lib.json
2025-12-03T04:37:14.1266617Z ##[debug]adding resource file: C:\azagent\_work\_tasks\Kubernetes_cbc316a2-586f-4def-be79-488a1f503564\1.227.0\node_modules\azure-pipelines-tool-lib\lib.json
2025-12-03T04:37:14.1266955Z ##[debug]system.culture=en-US
2025-12-03T04:37:14.2243933Z ##[debug]Agent.ProxyUrl=undefined
2025-12-03T04:37:14.2244250Z ##[debug]Agent.CAInfo=undefined
2025-12-03T04:37:14.2244578Z ##[debug]Agent.ClientCert=C:\azagent\signed-***-devops.crt
2025-12-03T04:37:14.2244900Z ##[debug]Agent.ClientCertKey=C:\azagent\signed-***-devops.key
2025-12-03T04:37:14.2245204Z ##[debug]Agent.ClientCertArchive=C:\azagent\***-devops.pfx
2025-12-03T04:37:14.2246146Z ##[debug]Agent.ClientCertPassword=***
2025-12-03T04:37:14.2246562Z ##[debug]check path : C:\azagent\_work\_tasks\Kubernetes_cbc316a2-586f-4def-be79-488a1f503564\1.227.0\node_modules\azure-pipelines-tasks-kubernetes-common\node_modules\azure-pipelines-tool-lib\lib.json
2025-12-03T04:37:14.2247047Z ##[debug]adding resource file: C:\azagent\_work\_tasks\Kubernetes_cbc316a2-586f-4def-be79-488a1f503564\1.227.0\node_modules\azure-pipelines-tasks-kubernetes-common\node_modules\azure-pipelines-tool-lib\lib.json
2025-12-03T04:37:14.2247403Z ##[debug]system.culture=en-US
2025-12-03T04:37:14.7629094Z ##[debug]check path : C:\azagent\_work\_tasks\Kubernetes_cbc316a2-586f-4def-be79-488a1f503564\1.227.0\node_modules\azure-pipelines-tasks-kubernetes-common\module.json
2025-12-03T04:37:14.7629688Z ##[debug]adding resource file: C:\azagent\_work\_tasks\Kubernetes_cbc316a2-586f-4def-be79-488a1f503564\1.227.0\node_modules\azure-pipelines-tasks-kubernetes-common\module.json
2025-12-03T04:37:14.7630109Z ##[debug]system.culture=en-US
2025-12-03T04:37:14.8969126Z ##[debug]System.TeamFoundationCollectionUri=https://***-devops.mydomain.ltd/GNT/
2025-12-03T04:37:14.8969796Z ##[debug]System.HostType=build
2025-12-03T04:37:14.8970081Z ##[debug]System.DefaultWorkingDirectory=C:\azagent\_work\2\s
2025-12-03T04:37:14.8970372Z ##[debug]Build.SourceBranchName=BF_Temporal
2025-12-03T04:37:14.8970646Z ##[debug]Build.Repository.Provider=TfsGit
2025-12-03T04:37:14.8970963Z ##[debug]Build.Repository.Uri=https://***-devops.mydomain.ltd/GNT/Unify/_git/Unify
2025-12-03T04:37:14.9698216Z ##[debug]agent.proxyurl=undefined
2025-12-03T04:37:14.9700100Z ##[debug]VSTS_ARM_REST_IGNORE_SSL_ERRORS=undefined
2025-12-03T04:37:14.9700408Z ##[debug]AZURE_HTTP_USER_AGENT=TFS_4d0e59f9-f443-4004-ae7e-06392c5c68b9_build_22_0
2025-12-03T04:37:17.0768056Z ##[debug]check path : C:\azagent\_work\_tasks\Kubernetes_cbc316a2-586f-4def-be79-488a1f503564\1.227.0\task.json
2025-12-03T04:37:17.0768482Z ##[debug]adding resource file: C:\azagent\_work\_tasks\Kubernetes_cbc316a2-586f-4def-be79-488a1f503564\1.227.0\task.json
2025-12-03T04:37:17.0768831Z ##[debug]system.culture=en-US
2025-12-03T04:37:17.0890742Z ##[debug]check path : C:\azagent\_work\_tasks\Kubernetes_cbc316a2-586f-4def-be79-488a1f503564\1.227.0\node_modules\azure-pipelines-tasks-azure-arm-rest\module.json
2025-12-03T04:37:17.0892844Z ##[debug]adding resource file: C:\azagent\_work\_tasks\Kubernetes_cbc316a2-586f-4def-be79-488a1f503564\1.227.0\node_modules\azure-pipelines-tasks-azure-arm-rest\module.json
2025-12-03T04:37:17.0893224Z ##[debug]system.culture=en-US
2025-12-03T04:37:17.1109001Z ##[debug]cwd=C:\azagent\_work\2\s
2025-12-03T04:37:17.1136397Z ##[debug]containerRegistryType=Container Registry
2025-12-03T04:37:17.1137360Z ##[debug]command=create
2025-12-03T04:37:17.1142735Z ##[debug]which 'kubectl'
2025-12-03T04:37:17.1147224Z ##[debug]found: 'C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe'
2025-12-03T04:37:17.1148007Z ##[debug]agent.tempDirectory=C:\azagent\_work\_temp
2025-12-03T04:37:17.1158146Z ##[debug]connectionType=Kubernetes Service Connection
2025-12-03T04:37:17.1376953Z ##[debug]kubernetesServiceEndpoint=fec823f0-650a-45e2-919c-221c1733bc5f
2025-12-03T04:37:17.1377305Z ##[debug]fec823f0-650a-45e2-919c-221c1733bc5f data authorizationType = Kubeconfig
2025-12-03T04:37:17.1382123Z ##[debug]fec823f0-650a-45e2-919c-221c1733bc5f auth param kubeconfig = ***
2025-12-03T04:37:17.1382661Z ##[debug]fec823f0-650a-45e2-919c-221c1733bc5f auth param clusterContext = ***
2025-12-03T04:37:17.1446843Z (node:23128) [DEP0106] DeprecationWarning: crypto.createCipher is deprecated.
2025-12-03T04:37:17.1447318Z (Use `node --trace-deprecation ...` to show where the warning was created)
2025-12-03T04:37:17.1449080Z (node:23128) Warning: Use Cipheriv for counter mode of aes-256-ctr
2025-12-03T04:37:17.1452897Z ##[debug]versionOrLocation=version
2025-12-03T04:37:17.1454214Z ##[debug]versionSpec=1.13.2
2025-12-03T04:37:17.1456211Z ##[debug]checkLatest=false
2025-12-03T04:37:17.1464919Z ##[debug]which 'kubelogin'
2025-12-03T04:37:17.1602856Z ##[debug]not found
2025-12-03T04:37:17.1637719Z ##[debug]which 'C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe'
2025-12-03T04:37:17.1639369Z ##[debug]found: 'C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe'
2025-12-03T04:37:17.1640208Z ##[debug]C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe arg: version
2025-12-03T04:37:17.1640722Z ##[debug]C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe arg: ["-o","json"]
2025-12-03T04:37:17.1641516Z ##[debug]exec tool: C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe
2025-12-03T04:37:17.1641806Z ##[debug]arguments:
2025-12-03T04:37:17.1642052Z ##[debug] version
2025-12-03T04:37:17.1642427Z ##[debug] -o
2025-12-03T04:37:17.1642677Z ##[debug] json
2025-12-03T04:37:17.9189557Z ==============================================================================
2025-12-03T04:37:17.9189775Z Kubectl Client Version: v1.8.9
2025-12-03T04:37:17.9189921Z Kubectl Server Version: v1.33.5+rke2r1
2025-12-03T04:37:17.9190325Z ==============================================================================
2025-12-03T04:37:17.9192861Z ##[debug]secretName=regcred
2025-12-03T04:37:17.9193149Z ##[debug]configMapName=undefined
2025-12-03T04:37:17.9194860Z ##[debug]forceUpdate=true
2025-12-03T04:37:17.9195460Z ##[debug]Executing delete regcred secret
2025-12-03T04:37:17.9195762Z ##[debug]which 'C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe'
2025-12-03T04:37:17.9196885Z ##[debug]found: 'C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe'
2025-12-03T04:37:17.9198924Z ##[debug]namespace=***-unify
2025-12-03T04:37:17.9199311Z ##[debug]C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe arg: ["-n","***-unify"]
2025-12-03T04:37:17.9199629Z ##[debug]C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe arg: delete
2025-12-03T04:37:17.9199937Z ##[debug]C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe arg: secret
2025-12-03T04:37:17.9200240Z ##[debug]C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe arg: regcred
2025-12-03T04:37:17.9200582Z ##[debug]Calling Toolrunner exec() method asynchronously to execute the kubectl command and store the returned promise object.
2025-12-03T04:37:17.9202004Z ##[debug]exec tool: C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe
2025-12-03T04:37:17.9202298Z ##[debug]arguments:
2025-12-03T04:37:17.9202592Z ##[debug] -n
2025-12-03T04:37:17.9203404Z ##[debug] ***-unify
2025-12-03T04:37:17.9203686Z ##[debug] delete
2025-12-03T04:37:17.9203935Z ##[debug] secret
2025-12-03T04:37:17.9204178Z ##[debug] regcred
2025-12-03T04:37:17.9279488Z ##[debug]Called Toolrunner exec() method asynchronously. Returning the promise.
2025-12-03T04:37:18.6927120Z ##[debug]Exit code 1 received from tool 'C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe'
2025-12-03T04:37:18.6930966Z ##[debug]STDIO streams have closed for tool 'C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe'
2025-12-03T04:37:18.6937728Z ##[debug]Toolrunner exec() method returned successfully for the kubectl command.
2025-12-03T04:37:18.6942329Z ##[debug]secretType=dockerRegistry
2025-12-03T04:37:18.6944290Z ##[debug]containerRegistryType=Container Registry
2025-12-03T04:37:18.6945504Z ##[debug]dockerRegistryEndpoint=4d05f501-19db-4b80-94be-78c95176ab3a
2025-12-03T04:37:18.6946182Z ##[debug]4d05f501-19db-4b80-94be-78c95176ab3a data registrytype = Others
2025-12-03T04:37:18.6948652Z ##[debug]4d05f501-19db-4b80-94be-78c95176ab3a exists true
2025-12-03T04:37:18.6949133Z ##[debug]System.ServerType=OnPremises
2025-12-03T04:37:18.6958851Z ##[debug]Processed: ##vso[task.setvariable variable=CONTAINER_USERNAME;issecret=true;]***
2025-12-03T04:37:18.6959461Z ##[debug]Processed: ##vso[task.setvariable variable=CONTAINER_PASSWORD;issecret=true;]
2025-12-03T04:37:18.6959760Z ##[debug]Executing create regcred secret.
2025-12-03T04:37:18.6960061Z ##[debug]which 'C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe'
2025-12-03T04:37:18.6960366Z ##[debug]found: 'C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe'
2025-12-03T04:37:18.6960658Z ##[debug]namespace=***-unify
2025-12-03T04:37:18.6960953Z ##[debug]C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe arg: ["-n","***-unify"]
2025-12-03T04:37:18.6961263Z ##[debug]C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe arg: create
2025-12-03T04:37:18.6961569Z ##[debug]C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe arg: secret
2025-12-03T04:37:18.6961887Z ##[debug]C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe arg: docker-registry
2025-12-03T04:37:18.6962195Z ##[debug]C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe arg: regcred
2025-12-03T04:37:18.6962568Z ##[debug]C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe arg: --docker-server=***
2025-12-03T04:37:18.6971138Z ##[debug]C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe arg: --docker-username=***
2025-12-03T04:37:18.6971795Z ##[debug]C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe arg: --docker-password=
2025-12-03T04:37:18.6972425Z ##[debug]C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe arg: --docker-email=
2025-12-03T04:37:18.6972760Z ##[debug]Calling Toolrunner exec() method asynchronously to execute the kubectl command and store the returned promise object.
2025-12-03T04:37:18.6973089Z ##[debug]exec tool: C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe
2025-12-03T04:37:18.6973366Z ##[debug]arguments:
2025-12-03T04:37:18.6973711Z ##[debug] -n
2025-12-03T04:37:18.6973972Z ##[debug] ***-unify
2025-12-03T04:37:18.6974213Z ##[debug] create
2025-12-03T04:37:18.6974590Z ##[debug] secret
2025-12-03T04:37:18.6974833Z ##[debug] docker-registry
2025-12-03T04:37:18.6975075Z ##[debug] regcred
2025-12-03T04:37:18.6975390Z ##[debug] --docker-server=***
2025-12-03T04:37:18.6975653Z ##[debug] --docker-username=***
2025-12-03T04:37:18.6975905Z ##[debug] --docker-password=
2025-12-03T04:37:18.6976154Z ##[debug] --docker-email=
2025-12-03T04:37:18.6976756Z [command]C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe -n ***-unify create secret docker-registry regcred --docker-server=*** --docker-username=*** --docker-password= --docker-email=
2025-12-03T04:37:18.7229146Z ##[debug]Called Toolrunner exec() method asynchronously. Returning the promise.
2025-12-03T04:37:18.8228822Z error: flag docker-password is required
2025-12-03T04:37:18.8229099Z See 'kubectl create secret docker-registry -h' for help and examples.
2025-12-03T04:37:18.8290946Z ##[debug]Exit code 1 received from tool 'C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe'
2025-12-03T04:37:18.8291324Z ##[debug]STDIO streams have closed for tool 'C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe'
2025-12-03T04:37:18.8310620Z ##[debug]Toolrunner exec() method returned error for the kubectl command. Error: Error: The process 'C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe' failed with exit code 1
at ExecState._setResult (C:\azagent\_work\_tasks\Kubernetes_cbc316a2-586f-4def-be79-488a1f503564\1.227.0\node_modules\azure-pipelines-task-lib\toolrunner.js:943:25)
at ExecState.CheckComplete (C:\azagent\_work\_tasks\Kubernetes_cbc316a2-586f-4def-be79-488a1f503564\1.227.0\node_modules\azure-pipelines-task-lib\toolrunner.js:926:18)
at ChildProcess.<anonymous> (C:\azagent\_work\_tasks\Kubernetes_cbc316a2-586f-4def-be79-488a1f503564\1.227.0\node_modules\azure-pipelines-task-lib\toolrunner.js:839:19)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1100:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5).
2025-12-03T04:37:18.8312232Z ##[debug]task result: Failed
2025-12-03T04:37:18.8337688Z ##[error]The process 'C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe' failed with exit code 1
2025-12-03T04:37:18.8342664Z ##[debug]Processed: ##vso[task.issue type=error;]The process 'C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe' failed with exit code 1
2025-12-03T04:37:18.8343666Z ##[debug]Processed: ##vso[task.complete result=Failed;]The process 'C:\azagent\_work\_tool\kubectl\1.8.9\x64\kubectl.exe' failed with exit code 1
2025-12-03T04:37:18.8344039Z ##[debug]connectionType=Kubernetes Service Connection
2025-12-03T04:37:18.8440735Z ##[section]Finishing: Kubernetes
What happened?
Task that fails:
I've tried creating the secret with the --from-file=.dockerconfigjson=.docker/config.json, where it complains about missing parameters also. The credentials in this file are a base64 string. But, I'm filing this bug because I can't create a secret. Please make this make sense.
The variables are defined, and it doesn't matter if they are plaintext or variables the error occurs.
Versions
Agent Version: 3.255.0 / Windows 11
I've found this version of the agent to be compatible with the server until now.
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
Azure DevOps Server (Please specify exact version in the textbox below)
Azure DevOps Server Version (if applicable)
Azure Devops 2022.2 (AzureDevopsServer_20240806.7)
Operation system
Windows Server 2019
Version controll system
git
Relevant log output