Knowledge Bank
  • My GitBook
  • Miscellaneous
  • Project
    • Rider and Intellij
    • Code
    • Frontend
      • Condition
      • AddConditionModalDialog
    • Backend
    • e2e
      • fragments
  • JAVASCRIPT
    • Promise
    • Destructuring
    • Spread Syntax and Rest Parameters
    • Typescript
      • Examples of Types
      • React Typescript
    • This
    • Dot Notation vs Bracket Notation
    • Shallow vs Deep Clone
    • New ES Edition
  • C#
    • Project Note
    • Basic
    • Shortcut and Debugging
  • Programming Paradigms
    • SOLID Principles
    • Object Oriented Programming (OOP)
      • Evolution of OOP (Procedural to OOP)
      • Instantiation
      • 4 Pillars of OOP
      • Extra
    • Functional Programming (FP)
      • Idempotent
      • Imperative vs Declarative
      • Immutability
      • High Order Function and Closure
      • Currying
      • Partial Application
      • Memoization and Caching
      • Compose and Pipe
      • Extra
      • Example of FP
    • OOP vs FP
      • Composition vs Inheritance
  • DATA STRUCTURE
    • Big O
    • Data Structure
    • Array
    • Hash Table
    • Linked List
    • Queue and Stack
    • Tree
      • Binary Heap
      • Trie
    • Graph
      • Example of Graph
  • React-Redux
    • MobX
    • Best Practices
  • Algorithms
    • Recursion
      • Examples of Recursion
    • Sorting
    • Searching and Traversal
    • Dynamic Programming
  • REFACTORING
    • Clean Code
      • Formatting
      • Error Handling
      • Concurrency
      • Testing
      • SOLID Principles
      • Classes
      • Objects and Data Structures
      • Variables
      • Functions
    • Code Smells
      • Long Function
      • Duplicate Code
      • Loops
      • Double Negative
      • Christmas Tree Code
      • Complex Condition
      • Primitive Obsession
      • Speculative Generality
      • God Class
      • Long Parameter List
  • Junior to Senior
    • AWS
      • Lambda
    • Session + Authentication
    • Redis
    • Kubernetes
      • Networking
      • Services
      • Deployment
      • Replica Set
      • YAML
      • pod-definition.yml
      • Kubectl
      • Pods
      • Fundamentals
    • Docker
      • Operating System - Extra
      • Dockerfile - Docker Image
      • Docker Storage
      • Docker Network
      • Docker Registry
      • Docker Command
      • Docker Compose
      • Docker Compose - Postgres
    • Security
      • Logging
      • HTTPS, Cross-Site-Scripting (XSS) and Cross-Site-Request-Forgery (CSRF)
      • 3rd Party Library
      • Injection
      • Code Secret, Secure Header, Access Control, Data Management, Authentication
    • CI/CD
    • SPA vs Server-Side Rendering
    • Performance
      • Optimized Code
      • Critical Render Path
      • Backend Optimization
      • Minimized Files and Images
      • Minimized Delivery
  • SECURITY
    • Encryption
    • SSH
  • Command
  • Cheatsheet
    • NPM
    • GIT
  • Writing Template
    • Guide
    • API
    • ChangeLog
    • FAQ
  • Linux
Powered by GitBook
On this page

Was this helpful?

  1. Junior to Senior
  2. Kubernetes

Fundamentals

PreviousPodsNextDocker

Last updated 4 years ago

Was this helpful?

Kubernetes and Docker

Kubernetes use docker host to host the applications in the form of docker container.

Node

Node (minions) is a machine (physical or virtual) on which kubernetes software are installed. It is a worker machine and that is where containers will be launched by kubernetes.

A cluster is a set of nodes grouped together. Why you need a set of odes? If one node fail, you have other node to support.

Master

Master is responsible for managing this cluster and store information about the cluster's member, manage the workload, etc. The actual orchestration of containers on worker node.

When you install kubernetes on a system, you are actually installing these following components:

  • API server - Front end for kubernetes (CLI, etc). All talks to API server to interact with kubernetes

    cluster.

  • etcd server - Distributed reliable key value. Store all data used to manage the cluster. It implements logs within the cluster to ensure there are no conflicts between the masters.

  • kubelet service - Agent that runs on each node in the cluster. The agent is responsible for making sure that the containers are running on the nodes as expected.

  • container runtime - Underlying software that is used to run the containers. In this case, it is docker.

  • controller - The brain behind the container orchestration (i.e. monitor the health of the node and replace failed node)

  • scheduler - Responsible for distributing works or container across multiple nodes. It looks for newly created containers and assign them to nodes

Different components are installed in Master vs Worker Node

Worker Node

  • To run docker container on the system, we need container runtime installed. So, in this case we use Docker

  • Has kubelet agent that is interacting with the master to provide health information of the worker node and carry out action required by the master on worker node.

Master

  • Has a kube-apiserver

  • Had etcd to store all information of worker nodes and other master

  • Has controller and scheduler