Registered users can read the full content for free
Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.
Page
1
(This page has no text content)
Page
2
(This page has no text content)
Page
3
Mastering AWS Elastic Kubernetes Services Building and deploying scalable containerized applications with Kubernetes and EKS Siva Guruvareddiar
Page
4
www.bpbonline.com
Page
5
First Edition 2025 Copyright © BPB Publications, India ISBN: 978-93-65899-887 All Rights Reserved. No part of this publication may be reproduced, distributed or transmitted in any form or by any means or stored in a database or retrieval system, without the prior written permission of the publisher with the exception to the program listings which may be entered, stored and executed in a computer system, but they can not be reproduced by the means of publication, photocopy, recording, or by any electronic and mechanical means. LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY The information contained in this book is true to correct and the best of author’s and publisher’s knowledge. The author has made every effort to ensure the accuracy of these publications, but publisher cannot be held responsible for any loss or damage arising from any information in this book. All trademarks referred to in the book are acknowledged as properties of their respective owners but BPB Publications cannot guarantee the accuracy of this information. www.bpbonline.com
Page
6
Dedicated to My Mom, Dad, Almighty Gurunathans, My Wife and My kids
Page
7
About the Author Siva Guruvareddiar is a senior specialist solutions architect at Amazon with over 18 years of extensive experience in designing, implementing, and managing cloud solutions. His expertise spans cloud computing, application development, big data, and application modernization, with particular emphasis on Kubernetes and cloud-native technologies. Currently at Amazon, Siva designs and implements cloud- based solutions using Kubernetes, Prometheus, and AWS services, achieving significant improvements in infrastructure costs and application performance. His career includes key roles at major technology companies like Apple, where he led containerized application deployments and cloud platform development, and Oracle, where he contributed to significant enterprise solutions. Siva holds numerous prestigious certifications, including AWS Solutions Architect Professional, AWS Big Data Specialty, and multiple CNCF Kubernetes certifications (Administrator, Developer, and Security Specialist). He has authored 20+ technical publications, including "Managing Kubernetes Control Plane Events in Amazon EKS" and "Authenticating with Grafana Using Open Source Keycloak on Amazon EKS.” etc His combination of hands-on experience, technical expertise, and passion for mentoring makes him uniquely qualified to guide readers through the complexities of AWS EKS. Through this book, he shares practical insights and
Page
8
best practices gained from years of implementing cloud- native solutions at enterprise scale.
Page
9
About the Reviewers ❖ Suresh Dodda commands an impressive 24-year career in technology, fortified by a Master’s degree in Computer Applications. His expertise spans Java, AWS, Spring Boot, Microservices, cloud-native solutions, and tools including AWS, Ansible, Kubernetes, Terraform, statistical learning, and data mining. He is also a technical reviewer for various books about CI/CD, Kubernetes, Java, AWS, and microservices. Suresh is an active reader and the author of the book Spring Boot Microservices Handbook Practical Guide for Developers. He is also an AI/ML researcher with many research articles published in IEEE conferences. He is a Fellow member of BCS, a Fellow member of IETE, and a Senior member of IEEE. ❖ Nikhil Kumar is a senior software engineer at HPE. with a broad and versatile skill set encompassing development, architecture, and consultancy. Nikhil has made significant contributions across diverse domains for various clients and employers. His areas of expertise include DevOps, Python, Cloud, Kubernetes and MLOps. He holds multiple prestigious certifications from Red Hat, including Red Hat Certified Engineer (EX294) and Red Hat Certified OpenShift Administrator (EX280). As a prolific technical blogger, Nikhil shares his extensive knowledge with the broader software engineering community and serves as a technical reviewer for various books on DevOps, Cloud, MLOps, and Kubernetes.
Page
10
Acknowledgement I would like to extend my heartfelt gratitude to everyone who contributed to the completion of this book. First and foremost, I sincerely thank my family for their unwavering support and encouragement throughout this journey. Their love and motivation have been my constant source of strength. I am deeply appreciative of BPB Publications for their invaluable guidance and expertise in bringing this book to life. Their support played a crucial role in navigating the complexities of the publishing process. I would also like to acknowledge the reviewers, technical experts, and editors whose insightful feedback and suggestions greatly improved the quality of this manuscript. Lastly, I am profoundly grateful to the readers who have shown interest in this book. Your support and enthusiasm mean the world to me. To everyone who played a part in making this book a reality, thank you.
Page
11
Preface In today's cloud-native landscape, Amazon Elastic Kubernetes Service (EKS) has emerged as a cornerstone for organizations seeking to build and scale containerized applications. "Mastering AWS Elastic Kubernetes Services" is crafted to be your comprehensive guide through the intricate world of Kubernetes on AWS, reflecting my experiences and insights gained from implementing EKS solutions at scale across various enterprise environments. This book systematically builds your understanding through 23 carefully structured chapters. We begin with fundamental Kubernetes concepts, ensuring a solid foundation before diving into EKS-specific architectures and components. The journey progresses from basic cluster setup to advanced operational aspects, including security, monitoring, and integration with AWS services. Each chapter is designed to provide practical, hands-on knowledge that you can immediately apply in your professional role. The middle sections of the book focus on real-world scenarios, covering crucial topics like deploying stateful applications, implementing networking solutions, and establishing robust security measures. We explore essential operational aspects such as monitoring, logging, and troubleshooting, which are vital for maintaining production- grade EKS clusters. As we advance, the book delves into modern DevOps practices, including CI/CD pipelines, GitOps workflows, and disaster recovery strategies. The final chapters concentrate
Page
12
on optimization techniques and best practices, ensuring your EKS implementations are not just functional but excel in performance, security, and cost-effectiveness. Drawing from my experience as a Solutions Architect at Amazon and previous roles at major technology companies, I've included practical examples, common pitfalls to avoid, and industry best practices throughout the book. Whether you're a DevOps engineer, cloud architect, or platform administrator, this book aims to enhance your expertise in managing containerized applications on AWS. I hope this book serves as your trusted companion in mastering AWS EKS, helping you build and maintain robust, scalable, and secure Kubernetes environments on AWS. Chapter 1: Introduction to Kubernetes - This chapter traces the evolution of container orchestration, starting from early virtualization to modern Kubernetes. It explores the progression from traditional virtualization to Linux containers and Docker's emergence. The chapter discusses how Kubernetes emerged as the solution to container orchestration challenges and its donation to CNCF in 2014. It examines the explosion of the cloud-native landscape and Kubernetes' journey to becoming the de facto container orchestration platform. The content covers enterprise capability maturity models and adoption patterns. Finally, it provides insights into Kubernetes' current dominance and future trajectory in the cloud-native ecosystem. Chapter 2: Kubernetes Architecture - A deep dive into Kubernetes' fundamental building blocks and architectural components. The chapter explores core concepts including controllers, labels, selectors, and annotations that form Kubernetes' backbone. It examines various controllers like Deployments, StatefulSets, DaemonSets, and Jobs, explaining their specific use cases. The content covers configuration management through ConfigMaps and
Page
13
Secrets, and automatic scaling via Horizontal Pod Autoscaler. The chapter discusses storage considerations and the crucial reconciliation loop mechanism. Finally, it addresses monitoring and security aspects within the Kubernetes architecture. Chapter 3: Kubernetes Components - Detailed examination of core Kubernetes components including kube- apiserver, etcd, and scheduler. The chapter explains the roles of critical components like kube-controller-manager, kubelet, and kube-proxy. It covers essential add-ons for container resource monitoring and cluster-level logging. The content explores networking components and their interactions within the cluster. Storage components and their integration with the core system are discussed. The chapter delves into extension components and their role. Finally, it ties together how these components work cohesively. Chapter 4: Introduction to Amazon Elastic Kubernetes Service - An overview of Amazon EKS and its key features including high availability and managed infrastructure. The chapter explores how EKS incorporates latest Kubernetes innovations while providing flexibility. It discusses optimized cost structures and built-in observability features. The content examines EKS's security and compliance capabilities. The chapter explains control plane management and worker node operations. Finally, it covers basic cluster administration and application deployment concepts. Chapter 5: Amazon Elastic Kubernetes Service Architecture - Comprehensive coverage of EKS cluster components including control plane and worker nodes. The chapter explores different node types including managed, self-managed, and Fargate nodes. It examines various autoscaling options including cluster, vertical, and
Page
14
horizontal pod autoscaling. The content covers security best practices and VPC network policies. The chapter discusses cluster upgrade and maintenance procedures. Integration capabilities with AWS services are explored. Finally, it details creating highly available production clusters. Chapter 6: Setting up Elastic Kubernetes Service Prerequisites - Detailed walkthrough of system requirements across Windows, macOS, and Linux platforms. The chapter covers essential IAM setup including user, group, and role creation. It explains VPC networking concepts including subnet layout and routing configuration. The content focuses on security group rules and IAM policies for CNI plugin access. Guidance on operations tool setup is provided. The chapter covers billing integration aspects. Finally, it ensures readers have all prerequisites configured correctly. Chapter 7: Creating Elastic Kubernetes Service Clusters - Comprehensive guide to creating EKS clusters using multiple approaches and tools. The chapter demonstrates cluster creation through the AWS Console for manual control. It covers automated cluster creation using the eksctl command-line tool. The content explores infrastructure as code options using AWS CDK. Terraform- based cluster deployment strategies are explained. The chapter covers Pulumi as an alternative IaC solution. Comparison of different approaches helps readers choose the right tool. Finally, it addresses common issues and best practices. Chapter 8: Accessing and Configuring Elastic Kubernetes Service Clusters - In-depth exploration of cluster access methods and configuration options. The chapter covers kubeconfig setup and management for CLI access. It explains Kubernetes role-based access control (RBAC) in detail. The content covers AWS IAM integration
Page
15
with Kubernetes RBAC. Various cluster configuration aspects including version upgrades are discussed. The chapter explores logging and secrets encryption setup. Finally, it covers add-ons management and cluster updates. Chapter 9: Deploying Sample Apps on AWS Elastic Kubernetes Service Clusters - Practical guide to deploying applications on EKS clusters using various methods. The chapter covers namespace isolation and pod deployment strategies. It explains service creation and Ingress configuration for external access. The content explores Helm usage for package management. Storage integration patterns are demonstrated. The chapter covers deployment rollout strategies. Finally, it introduces service mesh concepts and monitoring setup. Chapter 10: Managing Stateful Apps on AWS Elastic Kubernetes Service Clusters - Detailed examination of stateful application management in EKS environments. The chapter covers StatefulSets and their specific use cases. It explains persistent storage options including EBS, EFS, and S3. The content covers storage class configuration and CSI driver integration. Snapshot management and data mobility strategies are discussed. The chapter addresses security considerations for stateful workloads. Finally, it covers monitoring and maintenance aspects. Chapter 11: Scaling AWS Elastic Kubernetes Service Workloads - Comprehensive coverage of various scaling strategies in EKS environments. The chapter explores the evolution of Kubernetes scaling mechanisms. It details Horizontal Pod Autoscaler implementation and use cases. The content covers Vertical Pod Autoscaler for resource optimization. Cluster Autoscaler configuration and management are explained. The chapter introduces Karpenter as a modern scaling solution. Event-driven
Page
16
autoscaling patterns are discussed. Finally, it covers best practices for implementing scalable architectures. Chapter 12: Networking with AWS Elastic Kubernetes Services - Deep dive into networking concepts and implementations in EKS. The chapter covers pod networking fundamentals and service networking. It explains various ingress controller options and configurations. The content explores load balancing strategies with EKS. Security group configurations for pods are detailed. The chapter covers network policy implementation. Finally, it introduces advanced concepts like prefix delegation and VPC Lattice. Chapter 13: Securing AWS Elastic Kubernetes Service Clusters - Comprehensive guide to implementing security measures in EKS environments. The chapter covers pod and node security configurations. It explains IAM roles for service accounts integration. The content explores secrets management best practices. Amazon GuardDuty integration for EKS is detailed. The chapter covers Pod Security Standards implementation. Finally, it addresses policy management and EKS Pod Identity features. Chapter 14: Storage Options for AWS EKS Workloads - Detailed exploration of storage solutions available for EKS workloads. The chapter covers EBS integration using CSI drivers. It explains EFS implementation for shared storage needs. The content explores FSx for NetApp ONTAP integration. S3 storage patterns and use cases are discussed. The chapter covers FSx for Lustre high- performance options. Finally, it addresses cost considerations and administrative overhead. Chapter 15: Monitoring AWS EKS Clusters - Comprehensive guide to monitoring strategies for EKS environments. The chapter explores various monitoring options available. It details AWS console monitoring capabilities. The content covers Container Insights
Page
17
implementation. Kubecost integration for cost management is explained. The chapter covers monitoring metrics and alerting. Finally, it addresses performance monitoring best practices. Chapter 16: Logging and Troubleshooting AWS EKS Clusters - In-depth coverage of logging and troubleshooting techniques for EKS. The chapter explores control plane logging configuration. It explains CloudWatch Log Insights integration. The content covers various logging components and their setup. Common troubleshooting scenarios and solutions are discussed. The chapter addresses network and authentication issues. Finally, it covers control plane logs analysis. Chapter 17: Integrating EKS with Other AWS Services - Comprehensive guide to integrating EKS with various AWS services. The chapter covers Lambda integration patterns. It explains RDS collaboration strategies. The content explores ECS integration scenarios. CloudWatch integration for monitoring is detailed. The chapter covers DynamoDB integration patterns. Finally, it addresses optimization strategies for AWS service integration. Chapter 18: Continuous Integration and Continuous Deployment Pipelines for Amazon EKS - Detailed exploration of implementing CI/CD pipelines for EKS deployments. The chapter covers source code management strategies. It explains container image management. The content explores various deployment techniques. Pipeline validation and testing approaches are discussed. The chapter covers IAM role configuration for pipelines. Finally, it addresses pipeline orchestration using AWS CodePipeline. Chapter 19: GitOps Workflows with Amazon EKS - Comprehensive coverage of GitOps implementation in EKS environments. The chapter explores various GitOps tools and frameworks. It details Argo CD and Flux
Page
18
implementations. The content covers configuration management with Git. Internal Developer Platform integration is explained. The chapter addresses monitoring in GitOps workflows. Finally, it covers GitOps best practices. Chapter 20: Backup and Disaster Recovery with Amazon EKS - In-depth guide to backup and disaster recovery strategies for EKS. The chapter covers fundamental backup approaches. It explains application- centric data protection. The content explores infrastructure backup practices. AWS Fault Injection Simulator usage is detailed. The chapter covers various DR models. Finally, it addresses backup monitoring and testing strategies. Chapter 21: Amazon EKS Optimization and Best Practices - Comprehensive coverage of optimization strategies and best practices. The chapter explores cost optimization techniques. It details cluster upgrade strategies. The content covers various scaling considerations. Network optimization approaches are discussed. The chapter addresses reliability improvements. Finally, it covers security best practices implementation. Chapter 22: Data Workloads on Amazon EKS - Detailed exploration of running data workloads on EKS. The chapter covers Apache Spark deployment on EKS. It explains Jupyter Notebooks integration. The content explores Apache Trino implementation. Apache Superset deployment is detailed. The chapter addresses data workload optimization. Finally, it covers monitoring and maintenance aspects. Chapter 23: Generative Artificial Intelligence on Amazon EKS - Introduction to running generative AI workloads on EKS. The chapter covers initial setup requirements. It explains model training approaches on EKS. The content explores model inference implementations. Monitoring strategies for AI workloads are discussed. The
Page
19
chapter addresses performance optimization. Finally, it covers scaling considerations for AI workloads.
Page
20
Code Bundle and Coloured Images Please follow the link to download the Code Bundle and the Coloured Images of the book: https://rebrand.ly/e925kzu The code bundle for the book is also hosted on GitHub at https://github.com/bpbpublications/Mastering-Elastic- Kubernetes-Services. In case there’s an update to the code, it will be updated on the existing GitHub repository. We have code bundles from our rich catalogue of books and videos available at https://github.com/bpbpublications. Check them out! Errata We take immense pride in our work at BPB Publications and follow best practices to ensure the accuracy of our content to provide with an indulging reading experience to our subscribers. Our readers are our mirrors, and we use their inputs to reflect and improve upon human errors, if any, that may have occurred during the publishing processes involved. To let us maintain the quality and help us reach out to any readers who might be having difficulties due to any unforeseen errors, please write to us at : errata@bpbonline.com Your support, suggestions and feedbacks are highly appreciated by the BPB Publications’ Family.
The above is a preview of the first 20 pages. Register to read the complete e-book.
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
AI guide
【One-Line Pitch】
A hands-on field guide for engineers who already know containers and want to run Kubernetes on AWS properly—covering EKS architecture, cluster provisioning, storage, security, and cost-aware operations. Best suited to DevOps engineers, cloud architects, and platform administrators moving from tutorials to production.
【Book Arc】
- **Opening (~0%–10%)**: Traces container orchestration history from virtualization through Linux containers and Docker to Kubernetes' CNCF donation, then surveys adoption and enterprise maturity—establishing why Kubernetes became the default before any AWS specifics.
- **Early (~10%–32%)**: Builds the Kubernetes mental model—controllers, labels, pods, services, scheduling, container runtimes and OCI, and storage primitives (volumes, PVs, PVCs)—then pivots to EKS itself: managed control plane, worker nodes, and the EC2-versus-Fargate choice.
- **Middle (~32%–48%)**: Moves into practice: provisioning clusters via console, eksctl config files, and IaC tools (Terraform, CDK), plus RBAC and permission design, with worked examples and exercises.
- **Late (~48%–onward)**: Covers day-two operations—cluster upgrades and upgrade insights, monitoring options (Container Insights, Kubecost), logging and troubleshooting—and applied patterns like ML model serving on GPU nodes.
- **Ending**: Closes with optimization themes—performance, security, and cost-effectiveness—framed as the payoff for the earlier architecture and operations material.
【Key Takeaways】
- **EKS splits responsibility cleanly** (Early): AWS runs the control plane (API server, etcd, scheduling) across availability zones while you own worker nodes—this division is the lens for every later cost, security, and scaling decision.
- **Worker node choice is a real trade-off** (Early): EC2 instances offer customization; Fargate offers serverless simplicity. The book frames the decision around cost, scalability, and operational overhead rather than a single "right" answer.
- **Storage is designed around separation of concerns** (Early): Developers declare needs via PVCs; administrators provision PVs with reclaim policies and expansion—loose coupling that keeps storage portable across environments.
- **Runtime flexibility comes from OCI** (Early): Docker, containerd, CRI-O, and specialized runtimes like Kata all execute the same workloads, reducing lock-in and enabling confidential-computing scenarios.
- **Provisioning has a maturity ladder** (Middle): Console click-through for learning, eksctl config files for repeatability, and Terraform/CDK for fully automated, code-defined clusters—pick by team maturity, not preference.
- **RBAC and least privilege are foundational, not optional** (Middle): Permissions for Kubernetes resources and API access are treated as a core design concern, reinforced later by tightly scoped IAM roles and DevSecOps integration.
- **Upgrades need foresight** (Late): Upgrade insights surface deprecated APIs before version bumps, turning cluster maintenance from reactive breakage into planned transitions.
- **Observability and cost are paired concerns** (Late): Container Insights for health, Kubecost for spend—monitoring is framed as both reliability and budget control.
【Reading Tips】
- Skim the history and CNCF chapters (~0%–10%) if you already know Kubernetes' origins; slow down at the EKS architecture and storage sections, where the book's real value sits.
- Treat the eksctl/Terraform/CDK examples as templates—type them out and adapt rather than reading passively; the exercises at chapter ends are worth doing.
- Deep-read the RBAC, upgrade, and monitoring chapters if you operate clusters; these are where production incidents originate.
- Watch for the recurring cost/performance/security triad—it ties otherwise separate chapters together and is the book's implicit thesis.
【Coverage Limits】
The excerpts are fragmented (including OCR artifacts and table-of-contents fragments), so later chapters on monitoring, logging, and optimization are only partially represented; specific depth on networking internals and CI/CD pipelines is not verifiable from the sample.
Passage locations
Excerpt 1
bs, explaining their specific use cases. The content covers configuration management through ConfigMaps and Table of Contents 1. Introduction to Kubernetes I...
View in text
Excerpt 2
nes to improve high availability through smart replication. The scheduler assigns pods to optimal healthy nodes so interdependent apps get placed together, s...
View in text
Excerpt 3
which comprises several interconnected components that work together to provide a robust and scalable Kubernetes environment. The first critical element is t...
View in text
Excerpt 4
capability to perform actions such as reading, writing, or deleting collections of resources within the EKS environment. For instance, RBAC allows us to conf...
View in text
Recommended for You
{{#thumbnailUrl}}
{{/thumbnailUrl}}
{{^thumbnailUrl}}
{{/thumbnailUrl}}
Loading recommended books...
Failed to load, please try again later
Tip the Site
Scan the WeChat Pay or Alipay code to tip. No login required.
WeChat Pay
Alipay