-
Couldn't load subscription status.
- Fork 16
chore: Support for Azure Container Registry (ACR) Credential Provider #326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e3a696b
WIP
jadarsie e78dbcf
update
haofan-ms ae3e08b
update
haofan-ms 8680cf0
update
haofan-ms 8fa5529
windows
haofan-ms be7da15
clean up
haofan-ms 172e1ac
address comments
haofan-ms 2ae13d3
update
haofan-ms b425501
update
haofan-ms 76bed84
Update azure-acr-credential-provider.md
jadarsie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # Azure Container Registry (ACR) Credential Provider | ||
|
|
||
| ## Overview | ||
|
|
||
| Starting with Kubernetes v1.29, you **must** use [Out-of-Tree Credential Providers][KEP] to pull container images from private Azure Container Registry (ACR) instances. The legacy `--azure-container-registry-config` kubelet flag has been deprecated and removed. See [Cloud Provider Azure][CPA] documentation for more details. | ||
|
|
||
| ## What This Means for Your Cluster | ||
|
|
||
| When you deploy an AKS Engine cluster, the migration to ACR credential providers happens automatically: | ||
|
|
||
| **Automatic Migration**: AKS Engine removes the deprecated `--azure-container-registry-config` flag | ||
| **New Configuration**: Replaces it with modern credential provider flags: | ||
| - `--image-credential-provider-bin-dir` | ||
| - `--image-credential-provider-config` | ||
|
|
||
| > **No Action Required**: This transition is transparent - your cluster will continue to authenticate with ACR without any manual intervention. | ||
| ## How It Works | ||
|
|
||
| ### Configuration File Location | ||
|
|
||
| The credential provider uses a configuration file automatically deployed to: | ||
| ``` | ||
| /var/lib/kubelet/credential-provider-config.yaml | ||
| ``` | ||
|
|
||
| This file is **automatically provisioned** to all nodes (both master and worker) in your cluster. | ||
|
|
||
| ### Default Configuration | ||
|
|
||
| The default configuration handles authentication for all Azure Container Registry endpoints: | ||
|
|
||
| ```yaml | ||
| kind: CredentialProviderConfig | ||
| apiVersion: kubelet.config.k8s.io/v1 | ||
| providers: | ||
| - name: azure-acr-credential-provider | ||
| matchImages: | ||
| - "*.azurecr.io" # Azure Public Cloud | ||
| - "*.azurecr.cn" # Azure China Cloud | ||
| - "*.azurecr.de" # Azure Germany Cloud | ||
| - "*.azurecr.us" # Azure US Government Cloud | ||
| ``` | ||
| > **Reference**: View the complete default configuration file at [`credential-provider-config.yaml`](../../parts/k8s/cloud-init/artifacts/credential-provider-config.yaml) | ||
|
|
||
| [KEP]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-cloud-provider/2133-out-of-tree-credential-provider | ||
| [CPA]: https://cloud-provider-azure.sigs.k8s.io/topics/credential-provider/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
parts/k8s/cloud-init/artifacts/credential-provider-config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| kind: CredentialProviderConfig | ||
| apiVersion: kubelet.config.k8s.io/v1 | ||
| providers: | ||
| - name: azure-acr-credential-provider | ||
| apiVersion: credentialprovider.kubelet.k8s.io/v1 | ||
| defaultCacheDuration: 10m | ||
| matchImages: | ||
| - "*.azurecr.io" | ||
| - "*.azurecr.cn" | ||
| - "*.azurecr.de" | ||
| - "*.azurecr.us" | ||
| args: | ||
| - /etc/kubernetes/azure.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.