Kubernetes on AWS EKS for Beginners (Part 1)
Published on

Kubernetes on AWS EKS for Beginners (Part 1)

Quick overview of Kubernetes on AWS EKS for beginners.
Authors

Overview

    Introduction

    Note: This article is a curation of external links. I aim to give an overview.

    Prerequisites

    • Basic knowledge of AWS
    • Basic knowledge of Kubernetes (K8S)
    • Basic knowledge of Docker

    Introduction to Kubernetes

    Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation.

    The name Kubernetes originates from Greek, meaning helmsman or pilot.

    Google open-sourced the Kubernetes project in 2014. Kubernetes combines over 15 years of Google's experience running production workloads at scale with best-of-breed ideas and practices from the community.

    Traditional deployment era -> Virtualized deployment era -> Container deployment era

    Containers are similar to VMs, but they have relaxed isolation properties to share the Operating System (OS) among the applications. Therefore, containers are considered lightweight.

    The machines that make up a Kubernetes cluster are called nodes.

    Nodes in a Kubernetes cluster may be physical, or virtual.

    There are two types of nodes:

    1. A Control-plane-node type, which makes up the Control Plane, acts as the “brains” of the cluster.
    2. A Worker-node type, which makes up the Data Plane, runs the actual container images (via pods).

    K8S OBJECTS

    • Pods are the smallest deployable units of computing that you can create and manage in Kubernetes. A Pod (as in a pod of whales or pea pod) is a group of one or more containers, with shared storage and network resources, and a specification for how to run the containers.

    • DaemonSet = DaemonSets are used to ensure that some or all of your K8S nodes run a copy of a pod, which allows you to run a daemon on every node.

    • Deployment = Details how to roll out (or roll back) across versions of your application

    • ReplicaSet = Ensures a defined number of pods are always running

    • Job = Ensures a pod properly runs to completion

    • Service = Maps a fixed IP address to a logical group of pods

    • Label = Key/Value pairs used for association and filtering

    K8S Architecture

    Kubernetes Architecture

    CONTROL PLANE

    • One or More API Servers: Entry point for REST / kubectl

    • etcd: Distributed key/value store

    • Controller-manager: Always evaluating current vs desired state

    • Scheduler: Schedules pods to worker nodes

    DATA PLANE

    • Made up of worker nodes

    • kubelet: Acts as a conduit between the API server and the node

    • kube-proxy: Manages IP translation and routing

    KUBERNETES CLUSTER SETUP

    Amazon Elastic Kubernetes Service

    Amazon Elastic Kubernetes Service (Amazon EKS) gives you the flexibility to start, run, and scale Kubernetes applications in the AWS cloud or on-premises.

    EKS runs upstream Kubernetes and is certified Kubernetes conformant for a predictable experience. You can easily migrate any standard Kubernetes application to EKS without needing to refactor your code.

    EKS makes it easy to standardize operations across every environment. You can run fully managed EKS clusters on AWS.

    Amazon Elastic Kubernetes Service

    EKS CLUSTER CREATION STEPS

    1. Create EKS Cluster
      1. Create HA Control Plane
      2. IAM Integration
      3. Certificate Management
      4. Setup LB
    2. Provision worker nodes
    3. Launch add-ons
    4. Launch workloads

    EKS ARCHITECTURE FOR CONTROL PLANE AND WORKER NODE COMMUNICATION

    EKS ARCHITECTURE FOR CONTROL PLANE AND WORKER NODE COMMUNICATION

    Overview of EKS Cluster

    Overview of EKS Cluster

    So, I know part 1 was boring, but we will have hands-on article in part 2.

    See, you 👋


    External Links

    • https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/
    • https://www.eksworkshop.com/
    • https://aws.amazon.com/eks