Since 2020, AWS has supported running ARM-based Kubernetes worker nodes using AWS Graviton processors. Graviton is an ARM 64-bit CPU family designed by AWS to provide more performance with less power consumption than Intel/AMD processors. Currently, the Graviton2 CPUs are available on sixth-generation instances, and the Graviton3 CPUs are available on the seventh-generation. In AWS, ARM-based instances are cheaper than Intel/AMD instances. More performance, less consumption and cost.
35% faster than x86-64 processors in running Redis.
30% faster than x86-64 processors in running Apache Cassandra.
115% higher throughput than x86-64 processors in running MongoDB.
70% less power consumption than x86-64 processors.
20% less cost than x86-64 EC2 instances.
When to choose ARM-based instances:
Applications need to be compiled for ARM64 architecture to be able to run on ARM-based instances. So, your application must support ARM-based architecture, or if you use interpreted programming languages, like Python, its runtime must be available for the ARM64 platform. In EKS, you can have both arm64 and x86_64 instances simultaneously and run your applications based on their architectures on the proper nodes.
AWS EC2 Instance type naming convention:
Every EC2 instance type is named based on its family, generation, processor family, additional capabilities and size. If the processor family is not mentioned in the instance type name, it will be an Intel or AMD processor instance.
In Kubernetes, worker nodes’ architecture is specified within kubernetes.io/arch label. On ARM worker nodes, only ARM-based images can be deployed.
Run this command to see nodes and their architecture:
kubectl get no -L kubernetes.io/arch
Now, if you try to run a Pod using a non-ARM image, you’ll get an error:
kubectl run test --image ssbostan/alpine-nonroot:latest
But if you run a Pod using an image with ARM-arch available:
kubectl run redis --image redis:latest
ARM is a cool processor as it follows the RISC architecture, and it’s quite faster than CISC-based processors like Intel/AMD. When it comes to Kubernetes, it means you have a faster train with less power consumption to reach the destination; the only thing you need to be aware of is your images need to be built for ARM architecture.
If you like this series of articles, please share them and write your thoughts as comments here. Your feedback encourages me to complete this massively planned program. Just share them and provide feedback. I’ll make you an AWS EKS black belt.