Configure ECR Instead of Zot
An Open Container Initiative (OCI) registry is required to store OCI artifacts. Instead of the default in-cluster Zot registry, you can configure the PaletteAI Helm chart to use Amazon Elastic Container Registry (ECR) on self-managed Kubernetes clusters that use AWS EC2 instances. You can configure ECR during installation or afterward. To move an existing installation off Zot, refer to Switch from Zot to ECR After Installation.
Prerequisites
-
An existing self-managed Kubernetes cluster that uses AWS EC2 instances.
-
Access to the cluster
kubeconfigfile. -
Downloaded PaletteAI Helm values file.
curl --output values.yaml --silent https://docs.palette-ai.com/resources/assets/hosted/helm/values.yaml -
Install the following tools on the machine you use to install or upgrade PaletteAI:
-
An AWS IAM role with the following ECR permissions for either a private or public ECR:
- ECR Private
- ECR Public
Minimal inline policy example for private ECR{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ecr:CompleteLayerUpload",
"ecr:UploadLayerPart",
"ecr:InitiateLayerUpload",
"ecr:BatchCheckLayerAvailability",
"ecr:PutImage",
"ecr:BatchGetImage",
"ecr:GetDownloadUrlForLayer"
],
"Resource": "arn:aws:ecr:<region>:<account-id>:repository/<ecr-namespace>/<ecr-repo-name>"
},
{
"Effect": "Allow",
"Action": "ecr:GetAuthorizationToken",
"Resource": "*"
}
]
}infoThe ECR Public registry's alias is not included in the resource Amazon Resource Name (ARN).
Minimal inline policy example for ECR Public{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ecr-public:CompleteLayerUpload",
"ecr-public:UploadLayerPart",
"ecr-public:InitiateLayerUpload",
"ecr-public:BatchCheckLayerAvailability",
"ecr-public:PutImage"
],
"Resource": "arn:aws:ecr-public::<account-id>:repository/<ecr-repo-name>"
},
{
"Effect": "Allow",
"Action": [
"ecr-public:GetAuthorizationToken",
"sts:GetServiceBearerToken"
],
"Resource": "*"
}
]
} -
The IAM role is attached to an AWS instance profile, and that instance profile is attached to each EC2 node in the cluster.
Enablement
-
Open the Helm values file in a text editor. This example uses
vi.vi values.yaml -
Configure PaletteAI to push OCI artifacts to ECR. Set
hue.ociRegistry.providertoawsandhue.ociRegistry.endpointto your ECR registry URI. The registry URI syntax depends on whether you use a private or public ECR.- ECR Private
- ECR Public
hue:
ociRegistry:
enabled: true
endpoint: 'oci://<account-id>.dkr.ecr.<region>.amazonaws.com/<ecr-namespace>'
repository: '<ecr-repo-name>'
insecure: false
interval: 5m
timeout: 60s
provider: 'aws'hue:
ociRegistry:
enabled: true
endpoint: 'oci://public.ecr.aws/<public-registry-alias>'
repository: '<ecr-repo-name>'
insecure: false
interval: 5m
timeout: 60s
provider: 'aws' -
Update each entry under
fleetConfig.spokes[i].ociRegistryso every spoke cluster references the same ECR registry. Setprovidertoaws.- ECR Private
- ECR Public
fleetConfig:
spokes:
- name: spoke-1
ociRegistry:
endpoint: 'oci://<account-id>.dkr.ecr.<region>.amazonaws.com/<ecr-namespace>'
repository: 'mural-workloads'
insecure: false
provider: 'aws'fleetConfig:
spokes:
- name: spoke-1
ociRegistry:
endpoint: 'oci://public.ecr.aws/<public-registry-alias>'
repository: 'mural-workloads'
insecure: false
provider: 'aws'Repeat this step for every spoke cluster you plan to use.
-
On AWS IaaS, Hue and Flux
source-controlleruse the IAM permissions attached to the EC2 node instance profile. No additional service account annotations are required. -
If you already installed PaletteAI with the default Zot registry, remove the
basicAuthsection from both thehueandfleetConfigsections in your Helm values. When you use ECR, AWS handles authentication through the node instance profile.hue:
ociRegistry:
basicAuth:
username: '<username>'
password: '<password>'fleetConfig:
spokes:
- name: spoke-1
ociRegistry:
basicAuth:
username: '<username>'
password: '<password>' -
Apply the updated configuration. If you have not installed PaletteAI yet, continue with Install PaletteAI on AWS IaaS and use the updated
values.yamlfile.For Flux-managed installations, update the
valuesblock in theHelmReleasemanifest for yourmuralrelease and apply the changes to the cluster.kubectl apply --filename <path-to-your-mural-helmrelease>.yamlIf you manage the release manually, use the workflow below.
warningIf you do not use Flux, manage the
mural-crdschart separately from themuralchart. Apply or upgrade Custom Resource Definitions (CRDs) out of band before you install or upgrade themuralchart. For the manual Helm workflow, refer to Upgrade Manually.helm upgrade mural oci://public.ecr.aws/mural/mural --version 1.2.2 \
--namespace mural-system --values values.yaml --wait
Validate
-
If you use Flux, confirm that the
OCIRepositoryresources are ready.kubectl get ocirepository --namespace mural-system -
Check the Hue controller logs for successful OCI pushes.
kubectl logs --namespace mural-system deployment/hue-controllers | grep --ignore-case "push\|oci" -
Verify that artifacts exist in ECR.
- ECR Private
- ECR Public
aws ecr describe-images \
--repository-name <ecr-namespace>/<ecr-repo-name> \
--region <region>aws ecr-public describe-images \
--repository-name <ecr-repo-name> \
--region us-east-1
Next Steps
-
After you confirm that ECR is working, open the PaletteAI
values.yamlfile and disable Zot.vi values.yamlzot:
enabled: false -
Update your PaletteAI installation to remove Zot.
For Flux-managed installations, update the
valuesblock in theHelmReleasemanifest for yourmuralrelease and apply the changes to the cluster.kubectl apply --filename <path-to-your-mural-helmrelease>.yamlIf you manage the release manually, use the workflow below.
warningIf you do not use Flux, manage the
mural-crdschart separately from themuralchart. Apply or upgrade Custom Resource Definitions (CRDs) out of band before you install or upgrade themuralchart. For the manual Helm workflow, refer to Upgrade Manually.helm upgrade mural oci://public.ecr.aws/mural/mural --version 1.2.2 \
--namespace mural-system --values values.yaml --wait
To switch an existing installation from Zot to ECR, refer to Switch from Zot to ECR After Installation.