
Explore how Kubernetes scales workloads from one EC2 instance to many by using deployments, horizontal pod autoscaling, and node autoscalers that provision new nodes when pods become pending unschedulable.
Explore the challenges of the cluster autoscaler, including node group constraints, auto scaling group interactions, and EC2 provisioning latency, and see how Karpenter bypasses node groups for faster provisioning.
Explore Karpenter, a Kubernetes native, YAML-friendly node autoscaler that scales workers faster, respects scheduling, launches appropriate nodes without node groups, and optimizes costs for diverse workloads.
Compare HPA and Karpenter, the horizontal pod autoscaler and cluster autoscaler; HPA scales pods by CPU and memory metrics, while Karpenter scales nodes when scheduling fails, optimizing costs and nodes.
Learn about the general availability of Karpenter 1.0, its beta syntaxes, and upcoming changes toward version 1.1, with updated lectures for Karpenter v1 and insights from the AWS release blog.
Learn how Karpenter uses node pool YAML to provision the EC2 instance type for pods, with controls for instance family, size, architecture, availability zones, and capacity type (spot or on-demand).
Karpenter handles spot lifecycle with a built-in interruption handler using Amazon EventBridge to provision a new EC2 instance, drain interrupted spot, and pick spot or on-demand by cost and capacity.
Explain how karpenter configures AWS EC2 provisioning via node pool and EC2 node class YAML, covering AMI family, subnet and security group selectors, and required fields.
Explore the differences between node pool and EC2 node class in Karpenter, and learn how to map them with CRDs and YAML to enable proper EC2 launches.
Note that Karpenter masterclass demos require an aws ec2 ecs cluster and are not free. Expect about $10 in aws charges for a full demo session.
Install and run karpenter on a kubernetes cluster, create an ec2 node pool and ec2 node class, then auto scale by increasing replicas and monitor with logs.
update the default Karpenter node pool to on-demand and remove instance category so Karpenter can choose any instance type. observe provisioning of on-demand instances and spot priority during scale.
Explore how Karpenter integrates with Kubernetes scheduling, using node pools, node selectors, labels, taints, and tolerations to route pods by topology spread, availability zones, and GPU needs.
Explore Karpenter node pool strategies for a Kubernetes cluster: single, multiple, and weighted approaches, covering multi-tenant setups, scheduling constraints, limits, and prioritization of compute savings plans and specific instance types.
Learn how Karpenter schedules pods across multiple node pools by using node selectors and availability zone constraints to keep payments and reporting workloads on the correct EC2 instances.
Explore Karpenter observability with logs and metrics, and learn to use kubectl logs for deployment insights, plus Prometheus and Grafana dashboards to monitor node activity and startup latency.
Explore how Karpenter disruptions work, including voluntary disruption types—exploration, drift, consolidation, expiry—and the flow of scheduling simulations, pod eviction, and safe node termination.
Karpenter consolidates underutilized or empty nodes to reduce costs by moving pods. It replaces nodes with cheaper variants and creates smaller instances when needed, guided by consolidation policy.
Watch Karpenter consolidate underutilized EC2 nodes by scaling replicas and evicting pods to a busier node, then delete idle instances, visualized by the ECS Node Viewer.
Karpenter v1 introduces consolidation changes: rename underutilized to when empty or underutilized and enable consolidate after, reducing node churn during bursts by delaying consolidation.
Discover how karpenter uses drift to automatically upgrade and patch kubernetes nodes by aligning node pool and EC2 node class CRDs with running machines, including eks-optimized AMIs and rolling updates.
Leverage Karpenter drift to upgrade your data plane with a custom ami by selecting the latest ami via tags or id, resulting in node recycling and cost savings through consolidation.
Learn how Karpenter v1 handles upgrade and patching with drift, including node class references and ami selector terms. See deployments update ami versions via ssm parameter store and custom amis.
Demonstrates drift in Karpenter by changing the node pool from m to c and the EC2 node class from Al2 to Bottlerocket, provisioning new instances and migrating pods.
Explore how Karpenter uses exploration disruption to expire nodes after 30 days, evicting pods with a no-schedule taint, provisioning replacement nodes, while respecting the pod disruption budget.
Explore Karpenter v1 expiration changes that recycle EC2s after set periods, introduce termination grace periods, and resolve PDB and affinity constraints to enable timely node replacement with a new ami.
Learn to control Karpenter disruption using the do not disrupt annotation on pods and nodes, and manage voluntary vs involuntary disruptions with pod disruption budgets and node pool budgets.
Explore Karpenter v1 disruption budget changes, gaining granular control over node disruption by separating empty, underutilized, and drifted conditions, with working hours, weekends, and cumulative limits.
Explore Karpenter’s Kubernetes native autoscaling, fast EC2 provisioning, and cost-aware strategies for diverse workloads including machine learning and AI, upgrades, and scheduling constraints via node pools.
Learn how to achieve scheduled and preemptive autoscaling with Karpenter, using cron-driven replica changes and Keda cron triggers, plus cluster over provisioner with dummy pods and proportional autoscaler.
Discover how to simulate per-namespace node pools with Karpenter by labeling node pools and pods, enforcing constraints with RBAC and Kibana policies, and using resource quotas.
Learn to onboard karpenter, migrate from cluster autoscaler, and run a non-managed node group with core dns and metrics server in a phased rollout.
Master Karpenter best practices for changing capacity and scheduling constraints. Run the controller on ECS Fargate or a non-Karpenter two-node group for high availability.
Celebrate the course completion and learn from Raj's YouTube insights on coding aws, kubernetes, devops, serverless interview tips, and career transitions to aws; connect on linkedin and keep learning.
[8/2024] Added Lectures for Karpenter V1 Changes
What will you achieve from this course?
Welcome to Karpenter Masterclass for Kubernetes course:
Everything you need to know on Karpenter to ace your Kubernetes interview, and run production workload
Karpenter fundamentals to advanced concepts, including real-world considerations - Kubernetes scheduling, disruption, scheduled and pre-warmed scaling, best practices, and more
Master the topics with hands-on demos using Amazon EKS
Tips, tricks, learning from real world Cloud Architect
Master and showcase Karpenter skills before everyone else to get advantage on interview or at work
About the instructor
Rajdeep Saha is a Principal Solutions Architect at AWS. He has migrated and designed numerous mission-critical apps in the cloud, handling millions of transactions. LinkedIn awarded Rajdeep "Top Systems Design Voice" award to recognize his contribution in System Design. Rajdeep has presented at the biggest stages, such as AWS Re:Invent, AWS Summits, and Kubecon. He has authored multiple bestselling courses and mentored students successfully to cloud jobs, including FAANG companies. Rajdeep also runs a successful YouTube channel named "Cloud With Raj" with over 100K+ subscribers. He has over 250,000+ followers across the globe. Rajdeep takes pride in teaching real-world solutions and learnings beyond just theoretical information. You are in capable hands! All opinions are Rajdeep's own.
Course Structure
This course has four main areas - Intro to Karpenter, Karpenter Fundamentals, Karpenter Disruption, Karpenter Real-World Use Cases, and Migration.
Please check out the list of lectures for detailed breakdown of each area.
This is the course that could take your career to next level. Let's have some fun and build some awesome stuff in cloud together!