Elastic Kubernetes Service: Introduction (Part 1)

Huynh Phan
3 min readNov 8, 2020

--

This post is introduction for big pictures, advantages, and key definitions about Kubernetes.

What is Kubernetes?

I assume you already know what Docker is. To be brief, Kubernetes is an open source platform to help managing Docker containers.

Key features

  • Automates various manual processes. For instances, Kubernetes will control for you which server will host the container, how it will be launched etc.
  • Self-monitoring: Kubernetes checks constantly the health of nodes and containers. If a Pod (will talk later) does down, Kubernetes will automatically establish new one to replace.
  • Horizontal scaling: Kubernetes allows you scaling resources not only vertically but also horizontally, easily and quickly
  • Automates rollouts and rollbacks: If a change to your application goes wrong, Kubernetes will rollback for you.
  • Container balancing: Kubernetes forwards the requests amongst application pods to make sure the request is ‘best served’
Kubernetes Architecture

Components

There are some concepts that you need to know about Kubernetes

Cluster is a group or bunch of nodes that run your containerized applications

Node is a physical or virtual machine on your cluster. There are 2 types of node: Master Node (Control Plane, responsible for managing everything) and Worker Node (Nodes that run the application as containers). A Cluster will have 1 master node and many worker nodes.

Pod is the smallest deployable unit of the Kubernetes ecosystem. A pod specifically represents a group of one or more containers running together on your cluster. But usually, we should only have 1 container per pod.

Deployment is declarations for your application deployment. For examples, which application you want to deploy (by specify image on dockerhub), how many replicas (number of pods), application running ports, environment variables, …

Service is used to expose your application. There are 3 types of service

  • ClusterIP: Your application can be accessed within cluster only, internal access.
ClusterIP Service
  • NodePort: Application can be access by NodeIP:NodePort
NodePort Service
  • Load balancer (LB): standard way to expose a service to the internet. It will give you a single IP of LB. The request will first go to LB, then LB will choose a pod to relay request.
Load Balancer
  • Ingress: ingress actually is not a kubernetes service. Instead, it sits in front of multiple services and act as a “smart router” or entrypoint into your cluster. Have you ever heard of Nginx, it works the same.
Ingress Controller

We have 2 ways to use Kubernetes, Self-Managed and Provider-Managed. And to avoid setup complexity, I will use Provider-Managed one, which is EKS in my case.

I will talk about that later in Part 2. See you later.

--

--

Huynh Phan
Huynh Phan

Written by Huynh Phan

A Software Engineer. Enthusiasted by challenges, performances, high scale systems.

Responses (2)