2 Matching Annotations
  1. Mar 2025
    1. The main difference between the Amazon EKS-optimized AMI (amazon-eks-node-1.29) and the Bottlerocket AMI (bottlerocket-aws-k8s-1.29) lies in their purpose

      See the summary below this highlight

    1. Reduce container startup time on Amazon EKS with Bottlerocket data volume
      • Introduction

        • Containers are widely used for scalable applications but face challenges with startup times for large images (e.g., AI/ML workloads).
        • Pulling large images from Amazon Elastic Container Registry (ECR) can take several minutes, impacting performance.
        • Bottlerocket, an AWS open-source Linux OS optimized for containers, offers a solution to reduce container startup time.
      • Solution Overview

        • Bottlerocket's data volume feature allows prefetching container images locally, eliminating the need for downloading during startup.
        • Prefetching is achieved by creating an Amazon Elastic Block Store (EBS) snapshot of Bottlerocket's data volume and mapping it to new Amazon EKS nodes.
        • Steps to implement:
        • Spin up an Amazon EC2 instance with Bottlerocket AMI.
        • Pull application images from the repository.
        • Create an EBS snapshot of the data volume.
        • Map the snapshot to Amazon EKS node groups.
      • Benefits of Bottlerocket

        • It separates OS and container data volumes, ensuring consistency and security during updates.
        • Prefetched images significantly reduce startup times for large containers.
      • Implementation Walkthrough

        • Step 1: Build EBS Snapshot
          • Automate snapshot creation using a script.
          • Prefetch images like Jupyter-PyTorch and Kubernetes pause containers.
          • Export the snapshot ID for use in node group configuration.
        • Step 2: Setup Amazon EKS Cluster
          • Create two node groups:
          • no-prefetch-mng: Without prefetched images.
          • prefetch-mng: With prefetched images mapped via EBS snapshot.
        • Step 3: Deploy Pods
          • Test deployment on both node groups.
          • Prefetched nodes start pods in just 3 seconds, compared to 49 seconds without prefetching.
      • Results

        • Prefetching reduced container startup time from 49 seconds to 3 seconds, improving efficiency and user experience.
      • Further Enhancements

        • Use Karpenter for automated scaling with Bottlerocket nodes.
        • Automate snapshot creation in CI pipelines using GitHub Actions.
      • Cleaning Up

        • Delete AWS resources (EKS cluster, Cloud9 environment, EBS snapshots) to avoid charges after testing.
      • Conclusion

        • Bottlerocket's data volume prefetching dramatically enhances container startup performance for large workloads on Amazon EKS.