Kaniko with S3 build context builds containers on EKS without Docker
Needed to build container images on EKS but couldn't run a Docker daemon. Kaniko's S3 build context feature solved it cleanly.
Upload source as tar.gz to S3, then point the Kaniko Job at it with --context=s3://.
apiVersion: batch/v1
kind: Job
metadata:
name: kaniko-build
namespace: build
spec:
template:
spec:
serviceAccountName: kaniko
containers:
- name: kaniko
image: gcr.io/kaniko-project/executor:latest
args:
- "--context=s3://my-bucket/build/context.tar.gz"
- "--destination=123456789.dkr.ecr.ap-northeast-1.amazonaws.com/my-app:latest"
restartPolicy: NeverThe key is granting ECR push permissions (ecr:PutImage, ecr:CompleteLayerUpload, etc.) and S3 read permissions to the kaniko service account via Pod Identity. No credential mounts needed — Pod Identity handles it automatically. Build times were 70-130 seconds for a Python app.
