The password-free component automates authentication when pulling images, eliminating the need to repeatedly configure imagePullSecrets. This topic describes how to install, configure, and use the password-free component, along with important considerations.
How it works
When using ACR as an image source, if public anonymous pull is not enabled, your ACK cluster must provide a username and password for authentication each time it pulls an image. The common approach is to store the credentials in a Secret, but this introduces several issues:
-
A Secret stores credentials as Base64-encoded plaintext, posing a security risk.
-
You must manually specify
imagePullSecretsfor every workload. -
Secrets cannot be used across namespaces.
The password-free component works as follows:
-
The component retrieves temporary credentials (username and password) from the ACR instance.
-
It stores these credentials in a Secret.
-
It associates the Secret with the ServiceAccount specified in the component configuration.
-
Workloads that use these ServiceAccounts automatically use the temporary credentials in the Secret to pull images.
The password-free component supports managing ServiceAccounts across multiple namespaces and periodically refreshes the temporary credentials to reduce security risks. It eliminates the need to manually configure imagePullSecrets in workloads and is provided at no additional cost.
Passwordless component comparison
ACK provides the aliyun-acr-credential-helper component in two forms: managed and self-managed. You can install only one version at a time. The following table compares the two versions.
|
Difference |
aliyun-acr-credential-helper (managed) |
aliyun-acr-credential-helper (self-managed) |
|
Supported cluster versions |
Version 1.22 or later of ACK managed cluster, ACK serverless cluster, ACK Edge cluster |
version 1.20 or later ACK managed cluster, ACK dedicated cluster |
|
Features |
|
|
To upgrade a cluster, see Manually upgrade a cluster.
Prerequisites
-
Your cluster version is supported by the password-free component. See the table above.
-
Your Container Registry (ACR) instance is an Enterprise instance.
Important-
aliyun-acr-credential-helper only supports Container Registry Enterprise Edition instances and Container Registry Personal Edition instances that were created on September 8, 2024 or earlier. If you cannot use aliyun-acr-credential-helper, see How do I use imagePullSecrets?.
-
-
The RAM role used by the password-free component has been granted permissions.
-
Network connectivity between your ACR Enterprise instance and ACK cluster is established.
Use the managed password-free component
Step 1: Install the component
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, click the name of your cluster. In the left navigation pane, click Add-ons.
-
On the Add-ons page, click the Security tab. Find the aliyun-acr-credential-helper (managed) card and click Install.
-
On the Install aliyun-acr-credential-helper page, you will see the AcrInstanceInfo configuration and other options. AcrInstanceInfo defines settings for each ACR instance associated with the component. Other options are general component settings. If you do not need to change the namespaces or ServiceAccounts the component monitors, keep the default values.
After installation, go to the Add-ons page and click Configurations on the aliyun-acr-credential-helper (managed) card to update the component settings.

ACR instance association settings:
AcrInstanceInfo
Description
InstanceId
The ACR instance ID. You can find it in the Container Registry console.
ImportantLeave blank for ACR Personal instances. Required for ACR Enterprise instances.
regionId
The region ID of your ACR instance. You can find it in the Container Registry console.
ImportantRequired for cross-region image pulls.
domains
The domain names the password-free plug-in uses to access your ACR instance. By default, all domains (public and VPC) of the ACR instance specified above are included. To specify particular domains, separate them with commas (,).
Cross-account image pull settings
Use these settings only for cross-account image pulls. Leave blank if not needed.
assumeRoleARN
No configuration is needed for same-account pulls. For cross-account pulls, see Pull images across accounts.
expireDuration
rrsaRoleARN
rrsaOIDCProviderRoleARN
Step 2: Pull images
After installing and configuring the password-free component, specify a ServiceAccount already associated with the component when creating your workload to enable password-free image pulls.
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
serviceAccountName: my-service-account # Specify a ServiceAccount already associated with the password-free component
containers:
- name: nginx
image: "******.cn-hangzhou.cr.aliyuncs.com/nginx/nginx:latest" # Specify the ACR image address
ports:
- containerPort: 80
Use the self-managed password-free component
Step 1: Install the component
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, click the name of your cluster. In the left navigation pane, click Add-ons.
-
On the Add-ons page, click the Security tab. Find aliyun-acr-credential-helper and click Install.
-
On the Parameters page, select a permission mode using tokenMode, then click OK. After installation, complete the component configuration as described in Step 2: Update component configuration (add ACR instances) before pulling images.
tokenMode
Description
auto
(Recommended) The component detects your cluster creation date and automatically selects a permission mode. Clusters created before April 3, 2023, use workerRole mode. Clusters created on or after April 3, 2023, use managedRole mode.
ImportantStarting April 3, 2023, the aliyun-acr-credential-helper component includes a setting to customize the RAM role it depends on. For details, see [Product update] Announcement on changing permissions required by aliyun-acr-credential-helper.
managedRole
The component uses the AliyunCSManagedAcrRole granted in the Prerequisites section.
workerRole
The component uses the Worker RAM role of your cluster. You must grant specific permissions to this role.
ImportantChoose this mode to pull images across accounts using role assumption.
Step 2: Update component configuration (add ACR instances)
After installing the password-free component, configure the acr-configuration ConfigMap via the console or kubectl to add your ACR instances before pulling images.
Console
On the Clusters page, click the name of your cluster. In the left navigation pane, click .
-
On the ConfigMaps page, select kube-system from the Namespace drop-down list at the top. Click the acr-configuration ConfigMap and update it based on the following instructions.
Component setting
Description
watch-namespace
The namespaces where you want password-free image pulls. Default: default. Use all to enable password-free pulls in all namespaces. Separate multiple namespaces with commas (,). We recommend configuring only your business namespaces and avoiding
allor system namespaces to prevent interference with system component image pulls.acr-api-version
Keep the default value.
expiring-threshold
The credential expiration threshold inside the component. Default:
15m(15 minutes).acr-registry-info
An array of container registry instance information in YAML multiline string format. Each instance is configured as a trituple.
-
instanceId: The ACR instance ID. You can find it in the Container Registry console.ImportantLeave blank for ACR Personal instances. Required for ACR Enterprise instances.
-
regionId: The region ID of your ACR instance. You can find it in the Container Registry console.ImportantRequired for cross-region image pulls. See the configuration example below.
-
domains: The domain names the password-free plug-in uses to access your ACR instance. By default, all domains of the ACR instance specified ininstanceIdare included. To specify particular domains, separate them with commas (,).
service-account
The ServiceAccounts associated with the password-free component. Separate multiple ServiceAccounts with commas (,). When set to default, the component associates with the default ServiceAccount in each namespace specified in watch-namespace. When set to
“*”, the component associates with all ServiceAccounts in the specified namespaces. -

kubectl
-
Run the following command and update
acr-configurationbased on the instructions below.kubectl edit cm acr-configuration -n kube-systemKey
Configuration Item Key Description
configuration item value
service-account
Apply the password-free component to specified service accounts.
Default: default.
NoteTo specify multiple service accounts, separate them with commas (,). If set to
“*”, the component supports all ServiceAccounts in the specified namespaces.acr-registry-info
An array of container registry instance information in YAML multiline string format. Each instance is configured as a trituple.
NoteTrituple fields:
-
instanceId: Instance ID. Required for Enterprise instances.
-
regionId: Optional. Defaults to the local region.
-
domains: Optional. Defaults to all domains of the instance. To specify particular domains, separate them with commas (,).
Example configuration for an Enterprise container registry instance:
- instanceId: <cri-instanceId> regionId: "cn-hangzhou" domains: "xxx.com,yyy.com"watch-namespace
The namespaces where you want password-free image pulls.
Default: default. Use all to enable password-free pulls in all namespaces. Separate multiple namespaces with commas (,).
NoteWe recommend configuring only your business namespaces and avoiding all or system namespaces to prevent interference with system component image pulls.
expiring-threshold
The expiration threshold for locally cached credentials.
Default:
15m(15 minutes). -
Step 3: Pull images
After installing and configuring the password-free component, specify a ServiceAccount already associated with the component when creating your workload to enable password-free image pulls.
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
serviceAccountName: my-service-account # Specify a ServiceAccount already associated with the password-free component
containers:
- name: nginx
image: "******.cn-hangzhou.cr.aliyuncs.com/nginx/nginx:latest" # Specify the ACR image address
ports:
- containerPort: 80
FAQ
How do I enable immediate use of newly created ServiceAccounts?
You must upgrade the password-free component to version v23.02.06.1-74e2172-aliyun or later to enable this feature.
When enabled, the password-free component uses a webhook to monitor ServiceAccount changes in your cluster. When a new ServiceAccount is created, the component immediately injects a password-free Secret into it. This feature is useful when a ServiceAccount must be ready for immediate use—for example, when deploying a Helm chart that creates both a ServiceAccount and a Deployment simultaneously. Because this feature affects component performance, we do not recommend enabling it in other scenarios.
Managed component
Install the acr-credential-helper-webhook component in your cluster:
On the ACK Clusters page, click the name of your cluster. In the left navigation pane, click Add-ons.
-
On the Add-ons page, click the Security tab. Find the acr-credential-helper-webhook (managed) card and click Install.
Self-managed component
To enable this feature, add the following fields to your acr-configuration:
data:
webhook-configuration: |
enable: true
failure-policy: Ignore
timeout-seconds: 10
|
Setting |
Description |
|
|
Whether to enable the webhook feature.
|
|
|
The policy for handling ServiceAccount creation when the feature encounters an error.
Important
Due to limitations of your cluster’s API Server, if you set |
|
|
The timeout duration (in seconds) for processing a single ServiceAccount creation request. If exceeded, the component responds according to the |
Why do image pulls still fail after configuring the password-free component?
A possible cause is incorrect component configuration, such as:
-
The instance information in the password-free component does not match your ACR instance.
-
The image address used for pulling does not match the domain name in the component’s instance configuration.
Follow the steps in this topic to troubleshoot.
If the component configuration is correct but pulls still fail, your workload YAML might contain a manually specified imagePullSecrets field that conflicts with the password-free component. Delete the imagePullSecrets field and recreate the pod to resolve the issue.
How do I use imagePullSecrets?
ACR Personal instances created on or after September 9, 2024, do not support the password-free component. For these instances, we recommend storing your username and logon password in a Secret and referencing it in the imagePullSecrets field.
-
The password-free component cannot be used together with a manually specified
imagePullSecretsfield. -
The Secret must be in the same namespace as your workload.
References
-
For cross-account image pulls using the password-free component, see Pull images across accounts.
-
For the password-free component change record, see aliyun-acr-credential-helper.