Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Elastic Kubernetes Service on AWS

You're reading from   Mastering Elastic Kubernetes Service on AWS Deploy and manage EKS clusters to support cloud-native applications in AWS

Arrow left icon
Product type Paperback
Published in Jul 2023
Publisher Packt
ISBN-13 9781803231211
Length 448 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Yang-Xin Cao Yang-Xin Cao
Author Profile Icon Yang-Xin Cao
Yang-Xin Cao
Malcolm Orr Malcolm Orr
Author Profile Icon Malcolm Orr
Malcolm Orr
Arrow right icon
View More author details
Toc

Table of Contents (28) Chapters Close

Preface 1. Part 1: Getting Started with Amazon EKS
2. Chapter 1: The Fundamentals of Kubernetes and Containers FREE CHAPTER 3. Chapter 2: Introducing Amazon EKS 4. Chapter 3: Building Your First EKS Cluster 5. Chapter 4: Running Your First Application on EKS 6. Chapter 5: Using Helm to Manage a Kubernetes Application 7. Part 2: Deep Dive into EKS
8. Chapter 6: Securing and Accessing Clusters on EKS 9. Chapter 7: Networking in EKS 10. Chapter 8: Managing Worker Nodes on EKS 11. Chapter 9: Advanced Networking with EKS 12. Chapter 10: Upgrading EKS Clusters 13. Part 3: Deploying an Application on EKS
14. Chapter 11: Building Applications and Pushing Them to Amazon ECR 15. Chapter 12: Deploying Pods with Amazon Storage 16. Chapter 13: Using IAM for Granting Access to Applications 17. Chapter 14: Setting Load Balancing for Applications on EKS 18. Chapter 15: Working with AWS Fargate 19. Chapter 16: Working with a Service Mesh 20. Part 4: Advanced EKS Service Mesh and Scaling
21. Chapter 17: EKS Observability 22. Chapter 18: Scaling Your EKS Cluster 23. Chapter 19: Developing on EKS 24. Part 5: Overcoming Common EKS Challenges
25. Chapter 20: Troubleshooting Common Issues 26. Index 27. Other Books You May Enjoy

Understanding Kubernetes deployment architectures

There are a multitude of ways to deploy Kubernetes, depending on whether you are developing on your laptop/workstation, deploying to non-production or productions, or whether you are building it yourself or using a managed service such as EKS.

The following sections will discuss how Kubernetes can be deployed for different development environments such as locally on your laptop for testing or for production workloads.

Developer deployment

For local development, you may want to use a simple deployment such as minikube or Kind. These deploy a full control plane on a virtual machine (minikube) or Docker container (Kind) and allow you to deploy API resources on your local machine, which acts as both the control plane and data plane. The advantages of this approach are that everything is run on your development machine, you can easily build and test your app, and your Deployment manifests . However, you only have one worker node, which means that complex, multi-node application scenarios are not possible.

Non-production deployments

In most cases, non-production deployments have a non-resilient control plane. This typically means having a single master node hosting the control plane components (API server, etcd, and so on) and multiple worker nodes. This helps test multi-node application architectures but without the overhead of a complex control plane.

The one exception is integration and/or operational non-production environments where you want to test cluster or application operations in the case of a control plane failure. In this case, you may want to have at least two master nodes.

Self-built production environments

In production environments, you will need a resilient control plane, typically following the rule of 3, where you deploy 3, 6, or 9 control nodes to ensure an odd number of nodes are used to gain a majority during a failure event. The control plane components are mainly stateless, while configuration is stored in etcd. A load balancer can be deployed across the API controllers to provide resilience for K8s API requests; however, a key design decision is how to provide a resilient etcd layer.

In the first model, stacked etcd, etcd is deployed directly on the master nodes making the etcd and Kubernetes topologies tightly coupled (see https://d33wubrfki0l68.cloudfront.net/d1411cded83856552f37911eb4522d9887ca4e83/b94b2/images/kubeadm/kubeadm-ha-topology-stacked-etcd.svg).

This means if one node fails, both the API layer and data persistence (etcd) layers are affected. A solution to this problem is to use an external etcd cluster hosted on separate machines than the other Kubernetes components, effectively decoupling them (see https://d33wubrfki0l68.cloudfront.net/ad49fffce42d5a35ae0d0cc1186b97209d86b99c/5a6ae/images/kubeadm/kubeadm-ha-topology-external-etcd.svg).

In the case of the external etcd model, failure in either the API or etcd clusters will not impact the other. It does mean, however, that you will have twice as many machines (virtual or physical) to manage and maintain.

Managed service environments

AWS EKS is a managed service where AWS provides the control plane and you connect worker nodes to it using either self-managed or AWS-managed node groups (see Chapter 8, Managing Worker Nodes on EKS). You simply create a cluster and AWS will provision and manage at least two API servers (in two distinct Availability Zones) and a separate etcd autoscaling group spread over three Availability Zones.

The cluster supports a service level of 99.95% uptime and AWS will fix any issues with your control plane. This model means that you don’t have any flexibility in the control plane architecture but, at the same time, you won’t be required to manage it. EKS can be used for test, non-production, and production workloads, but remember there is a cost associated with each cluster (this will be discussed in Chapter 2, Introducing Amazon EKS).

Now you’ve learned about several architectures that can be implemented when building a Kubernetes cluster from development to production. In this book, you don’t have to know how to build an entire Kubernetes cluster by yourself, as we will be using EKS.

You have been reading a chapter from
Mastering Elastic Kubernetes Service on AWS
Published in: Jul 2023
Publisher: Packt
ISBN-13: 9781803231211
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image