Aws Eks
Aws Eks
answers:
Answer: Amazon Elastic Kubernetes Service (EKS) is a fully managed service that makes it
easy to run Kubernetes clusters on AWS. EKS eliminates the need to install and operate your
own Kubernetes control plane and nodes. It provides high availability, automatic scaling, and
security for running containerized applications using Kubernetes.
Managed Kubernetes Control Plane: EKS handles the management of the Kubernetes
master nodes, including scaling, patching, and ensuring high availability across multiple
availability zones.
Integration with AWS Services: EKS integrates seamlessly with AWS services like
IAM (for security), CloudWatch (for logging and monitoring), VPC (for networking),
and ELB (for load balancing).
Scalability: EKS supports horizontal pod autoscaling and node scaling, allowing you to
scale your applications based on demand.
Security: EKS integrates with AWS IAM for fine-grained access control, and supports
encryption of data at rest and in transit.
Support for AWS Fargate: EKS supports serverless Kubernetes with Fargate, which
allows you to run Kubernetes pods without managing the underlying EC2 instances.
Control Plane: Managed by AWS, including the Kubernetes API server, etcd (the key-
value store), scheduler, and controller manager.
Worker Nodes: EC2 instances that run the containerized applications. They manage the
pods in the Kubernetes cluster.
Pods: The smallest deployable units in Kubernetes that contain one or more containers.
Services: Kubernetes abstractions that define a set of pods and a policy to access them,
often used for load balancing.
Namespaces: Logical partitions within a Kubernetes cluster that allow you to divide
resources.
Ingress: An API object that manages external access to services, typically HTTP.
4. How does Amazon EKS differ from self-managed Kubernetes clusters?
Answer:
Amazon EKS: AWS manages the Kubernetes control plane (API server, scheduler, etcd,
etc.), providing automatic scaling, patching, and high availability across multiple
availability zones. You only need to manage the worker nodes and the application.
Self-managed Kubernetes: In a self-managed Kubernetes setup, you are responsible for
provisioning and maintaining both the control plane and the worker nodes, including
scaling, security, and patching. This gives you more control but requires more effort to
maintain.
Answer: eksctl is a command-line tool designed to make it easy to create, manage, and delete
EKS clusters. It simplifies cluster creation by handling the creation of EC2 instances, IAM roles,
and VPC settings. You can use eksctl to quickly launch an EKS cluster with default settings or
customize it according to your needs.
Amazon VPC CNI Plugin: This is the default CNI (Container Network Interface) plugin
that allows Kubernetes pods to have direct access to VPC networking. Each pod gets its
own IP address from the VPC.
Kubernetes Networking (Calico, Flannel): You can integrate other networking
solutions like Calico or Flannel to manage the pod networking and policies, though AWS
VPC CNI is the most commonly used.
Answer: AWS Identity and Access Management (IAM) is used to control access to EKS
resources. It enables you to:
Define roles and permissions for users, groups, and services interacting with the
Kubernetes cluster.
Associate IAM roles with EC2 instances to provide permissions for worker nodes to
interact with EKS.
Configure service accounts for pods, allowing granular control of AWS service access
(using IAM roles for service accounts, or IRSA).
Control access to the Kubernetes API using IAM authentication and the aws-iam-
authenticator.
Answer: AWS Fargate is a serverless compute engine that allows you to run containers without
managing the underlying infrastructure. In Amazon EKS, you can use Fargate profiles to
specify which Kubernetes pods should run on Fargate, allowing you to run pods without
provisioning or managing EC2 instances for worker nodes.
Horizontal Pod Autoscaling (HPA): Scales the number of pods in a deployment based
on CPU or memory utilization.
Cluster Autoscaler: Automatically adjusts the number of EC2 worker nodes in the
cluster based on pod resource demands.
AWS Fargate: Serverless compute that automatically scales based on the number of
pods running, without the need for managing EC2 instances.
Manual Scaling: You can manually scale Kubernetes deployments by adjusting the
number of replicas in your Kubernetes manifests.
Answer: Deployments in Amazon EKS are managed through Kubernetes resources such as:
Deployments: Define the desired state for a pod's configuration, and Kubernetes will
ensure that the correct number of replicas is running.
Services: Expose deployments internally or externally (using LoadBalancer or
NodePort).
Helm Charts: Helm is a Kubernetes package manager that simplifies the deployment and
management of applications. You can use Helm to install, configure, and upgrade
applications on EKS clusters.
11. What are the benefits of using Amazon EKS over Kubernetes on EC2?
Answer:
Fully Managed Control Plane: EKS manages the Kubernetes control plane (master
nodes), including automatic scaling, patching, and high availability.
Security: EKS integrates with AWS IAM for authentication and authorization, as well as
AWS VPC for networking, providing strong isolation and security.
Simplified Maintenance: EKS handles much of the Kubernetes infrastructure
maintenance, reducing operational overhead.
Integrated with AWS Services: EKS seamlessly integrates with AWS services such as
IAM, CloudWatch, Elastic Load Balancing (ELB), and others, making it easier to build
and manage production workloads.
Answer: Kubernetes namespaces allow you to divide cluster resources into multiple virtual
clusters. In Amazon EKS, namespaces help to:
1. Update the control plane: Use the AWS Management Console or eksctl to update the
Kubernetes version of the control plane.
2. Update worker nodes: Once the control plane is updated, you need to update the worker
nodes. You can either update the EC2 instances manually or use EKS managed node
groups, which support automatic upgrades.
3. Verify the update: After the update, verify that all pods are running correctly and check
for any issues with application deployments.
Answer: Kubernetes RBAC allows you to control access to Kubernetes resources based on
roles. In Amazon EKS, RBAC is used to:
Define roles (set of permissions) and role bindings (who can access the resources).
Control access to Kubernetes API objects such as pods, services, deployments, etc.
Assign permissions to users, groups, or service accounts, limiting or granting access to
resources within the cluster.
Answer: Amazon EKS Managed Node Groups provide an easy way to manage EC2 instances
in your EKS cluster. With managed node groups, AWS automatically provisions and maintains
the EC2 instances running as worker nodes for your cluster. It simplifies tasks such as scaling,
upgrading, and patching, as AWS handles the maintenance and lifecycle management of the EC2
instances.
Creating two separate environments (Blue and Green) where one environment (Blue)
serves live traffic and the other (Green) is used for the new version of the application.
After testing the Green environment, you can switch the traffic from Blue to Green.
Kubernetes Services and Ingress controllers can manage traffic routing for these
deployments.
These AWS EKS interview questions and answers cover key concepts around setting up and
managing Kubernetes clusters on AWS, including scaling, security, integration with other AWS
services, and deployment strategies. Familiarity with these topics will help you prepare for an
interview focused on Amazon EKS.