jx install --provider aks fails on existing AKS cluster
az aks create with RBAC, http app routing. az get-credentials and then jx install --provider aks
jx installs successfully
Failing with ACR error:
Saving the Git authentication configuration
Failed to create ACR edp-cluster in resource group k8s-managed
error: configuring the docker registry: configure cloud provider docker registry: getting registry configuration from Azure: failed to run 'az acr create -g k8s-managed -n ***-cluster --sku Standard --admin-enabled --query id -o tsv' command in directory '', output: 'ERROR: Parameter 'registry_name' must conform to the following pattern: '^[a-zA-Z0-9]*$'.
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 206, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 388, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 381, in _run_job
six.reraise(*sys.exc_info())
File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 357, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 171, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 442, in default_command_handler
return op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/custom.py", line 103, in acr_create
return client.create(resource_group_name, registry_name, registry)
File "/opt/az/lib/python3.6/site-packages/azure/mgmt/containerregistry/v2018_09_01/operations/registries_operations.py", line 351, in create
**operation_config
File "/opt/az/lib/python3.6/site-packages/azure/mgmt/containerregistry/v2018_09_01/operations/registries_operations.py", line 276, in _create_initial
'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$')
File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 592, in url
data = self.validate(data, name, required=True, **kwargs)
File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 672, in validate
raise ValidationError(key, name, value)
msrest.exceptions.ValidationError: Parameter 'registry_name' must conform to the following pattern: '^[a-zA-Z0-9]*$'.'
$ jx version
NAME VERSION
jx 1.3.809
Kubernetes cluster v1.11.5
kubectl v1.13.1
helm client v2.12.1+g02a47c7
helm server v2.12.1+g02a47c7
git git version 2.17.1
Operating System Ubuntu 18.04.1 LTS
AKS cluster
Kubernetes cluster v1.11.5
kubectl v1.13.1
helm client v2.12.1+g02a47c7
helm server v2.12.1+g02a47c7
Windows 10 / WSL Ubuntu 18.04 LTS
@elluvium Did you create the registry manually, or is created by jx? It looks that its name is not conform with Azure naming conversion.
msrest.exceptions.ValidationError: Parameter 'registry_name' must conform to the following pattern: '^[a-zA-Z0-9]*$'.'
@ccojocar I didn't create a registry beforehand. Jx tries to create it by itself
@elluvium JX tries to create an ACR with the same name as your AKS. For a workaround, you can create an ACR yourself, and set the --docker-registry <registry>.azurecr.io
Hi, just to add in, same here. my AKS name format is "dev-cluster" and I get the same issue.
Your workaround of the following is good though:
jx install --provider aks --docker-registry=nameofacr.azurecr.io
Currently I have no Go environment to test the code. Take the following if anyone wants to apply the fix.
The fix should be at this line to acrName = normalize(name), the normalize function should
'^[a-zA-Z0-9]*$'./area jenkins
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.
Provide feedback via https://jenkins-x.io/community.
/lifecycle stale
Hi @elluvium, We are closing this issue because static Jenkins masters have been deprecated and removed from Jenkins X in favor of focusing on Tekton pipelines.
This blog has more information as to the reasons why: https://jenkins-x.io/blog/2020/03/11/tekton/
If you鈥檇 like to discuss this in more detail, please join our Jenkins X channels in the Kubernetes Slack and tag any of our product leadership (Deane Smith, Viktor Farcic, Ethan Jones, Dave Conde, James Rawlings, James Strachan) and we鈥檇 be happy to discuss further.
If this is a surprise to you, consider joining the Jenkins X newsletter and other community channels to make sure that important notices like this always make it to you: https://jenkins-x.io/community/ https://jenkins-x.io/community/
Most helpful comment
@elluvium JX tries to create an ACR with the same name as your AKS. For a workaround, you can create an ACR yourself, and set the
--docker-registry <registry>.azurecr.io