Archy is a Kubernetes mutating admission webhook that automatically ensures your Pods are scheduled on nodes with compatible architectures.
In multi-architecture Kubernetes clusters (e.g., mixing amd64 and arm64 nodes), scheduling pods can be challenging. If a pod is scheduled on a node that doesn't support its container image's architecture, it will fail to start with CrashLoopBackOff or ImagePullBackOff.
Archy solves this by:
- Intercepting Pod creation requests.
- Inspecting the container images defined in the Pod (both init and regular containers).
- Determining the common supported architectures across all images.
- Automatically patching the Pod's
nodeSelectorto target the correct architecture.
- Automatic Architecture Detection: Inspects container image manifests to find supported platforms.
- Multi-Arch Support: If images support multiple architectures (e.g., multi-arch builds), Archy lets Kubernetes scheduling logic take over, allowing the pod to run on any compatible node.
- Private Registry Support: Supports authenticating with private registries using the Pod's
imagePullSecretsand ServiceAccount credentials. - Safety First: If images have no common architecture, the Pod is rejected to prevent scheduling failures.
When a Pod is submitted to the cluster:
- Archy receives the
AdmissionReviewrequest. - It extracts the list of images from
spec.containersandspec.initContainers. - It queries the container registry (public or private) for each image's manifest.
- It calculates the intersection of supported architectures.
- Single Match: Adds
kubernetes.io/arch: <arch>tospec.nodeSelector. - Multiple Matches: No action taken; allows Kubernetes to schedule on any compatible node.
- No Match: Rejects the Pod creation.
- Single Match: Adds
- Strict NodeSelector: Currently uses
nodeSelectorwhich is a hard constraint. Future versions may supportnodeAffinityfor softer preferences. - Network Connectivity: The webhook must have network access to the container registries to inspect images.
- Explicit Secrets: For private registries,
imagePullSecretsmust be explicitly defined in the Pod spec or attached to the ServiceAccount.
Install from GitHub Container Registry:
# Install the latest version
helm install archy oci://ghcr.io/lsdopen/archy/charts/archy
# Install a specific version
helm install archy oci://ghcr.io/lsdopen/archy/charts/archy --version 0.1.0
# Install with custom values
helm install archy oci://ghcr.io/lsdopen/archy/charts/archy --values my-values.yamlApply the Kubernetes manifests directly:
kubectl apply -f deploy/For detailed configuration options and advanced deployment scenarios, see the Helm Chart README.
Apache License 2.0
