AWS Cloud Developer: Orchestration with Kubernetes Flashcards
Orchestration
Orchestration is the automated management of the lifecycle of our application
Kubernetes
A container orchestration system packed with features for automating our application’s deployment
Enables us to easily scale our application and ship new code
Pods
A set of containers that are deployed together
Containers often need to communicate with one another. It’s not uncommon to see a deployment involving a few containers to be deployed.
Kubernetes pods are abstractions of multiple containers and are also ephemeral.
Services
Applications are often deployed with multiple replicas. This helps with load balancing and horizontal scaling.
Services are an abstraction of a set of pods to expose them through a network
Load Balancing
Handling traffic by distributing it across different endpoints
Replica
A redundant copy of a resource often used for backups or load balancing
Round Robbin Load Balancing
Round‑robin load balancing is one of the simplest methods for distributing client requests across a group of servers. Going down the list of servers in the group, the round‑robin load balancer forwards a client request to each server in turn. When it reaches the end of the list, the load balancer loops back and goes down the list again (sends the next request to the first listed server, the one after that to the second server, and so on).
Main benefit of Round Robin load balancing
The main benefit of round‑robin load balancing is that it is extremely simple to implement. However, it does not always result in the most accurate or efficient distribution of traffic, because many round‑robin load balancers assume that all servers are the same: currently up, currently handling the same load, and with the same storage and computing capacity.
2 types of Round Robbin Load-balancing algorithms that take additional factors such as machine type and resources into account
Weighted round robin – A weight is assigned to each server based on criteria chosen by the site administrator; the most commonly used criterion is the server’s traffic‑handling capacity. The higher the weight, the larger the proportion of client requests the server receives. If, for example, server A is assigned a weight of 3 and server B a weight of 1, the load balancer forwards 3 requests to server A for each 1 it sends to server B.
Dynamic round robin – A weight is assigned to each server dynamically, based on real‑time data about the server’s current load and idle capacity.
Amazon EKS
Amazon Elastic Kubernetes Service (Amazon EKS) gives you the flexibility to start, run, and scale Kubernetes applications in the AWS cloud or on-premises.
CMD: Create a kubeconfig automatically
aws eks –region update-kubeconfig –name
CMD: Check kubeconfig configuraiton
kubectl get svc
What three dependencies needs to be installed and setup in order to interact with kubernetes cluster?
Install kubectl
Set up aws-iam-authenticator
Set up kubeconfig
CMD: Loading yaml file
kubectl apply -f deployment.yaml
CMD: kubectl show pods in the cluster
kubectl get pods