β˜€οΈ
Dev7Days
  • πŸ˜„Welcome
  • Local Setup
    • βš™οΈSetup Terminal
    • βš™οΈSetup IDE
    • βš™οΈSetup Neovim
  • Rust
    • πŸ¦€Cargo
  • Java
    • πŸƒSpring Boot
      • Spring Boot Annotaion
      • Spring Boot Learning
    • πŸƒJDK vs JRE vs JVM
    • πŸƒWhat is JDBC ?
    • πŸƒWhat is Data Source in Java ?
    • πŸƒCheck vs Unchecked Exception
    • πŸƒWhat is Servlet in Java ?
    • πŸƒFilter vs Interceptor
    • πŸƒMockito
    • πŸƒMaven CLI
    • πŸƒMaven Archetype
  • Go
    • πŸ”ΉGo Routine and Channel
    • πŸ”ΉGo CLI
  • Ruby and Rails
    • ♦️Ruby Syntax
    • ♦️Rails Framework
    • ♦️Rails Structure
  • Fundamental
    • πŸ“šGit Command
    • πŸ“šInterpreter vs Compiler
    • πŸ“šDTO vs DAO
    • πŸ“šHttp Status
    • πŸ“šWhat is Batch Process ?
    • πŸ“šHttps
    • πŸ“šLocal Storage vs Session Storage vs Cookies
    • πŸ“šAuthentication & Authorization
    • πŸ“šDatabase Index
    • πŸ“šWhat is GRPC ?
    • πŸ“šWhat is Microservice ?
  • Database
    • πŸ—ƒοΈWhat is Transaction ?
    • πŸ—ƒοΈACID
  • Postgres
    • 🐘SELECT
    • 🐘Column Alias
    • 🐘Order By
    • 🐘SELECT DISTINCT
  • Elastic Search
    • πŸ”What is Elastic Search ?
    • πŸ”Node and Cluster
  • Kubernetes
    • ☸️What is Kubernetes ?
    • ☸️Kubernetes Architecture
      • Node
      • ETCD
      • Kube API Server
      • Controller Manager
      • Kube Scheduler
      • Kubelet
      • Kube Proxy
  • ☸️Pod
  • ☸️ReplicaSet
  • ☸️Deployment
  • ☸️Service
  • ☸️Config Map
  • ☸️Namespaces
  • ☸️Kube Apply Command
  • ☸️Scheduling
    • Manual Scheduling
    • Labels and Selectors
    • Taints and Tolerations
    • Node Selector
    • Node Affinity
    • Resource Requirements and Limits
    • DaemonSets
    • Static Pods
    • MultipleSchedulers
  • ☸️Monitoring
  • AWS
    • πŸ”ΈHow can users access AWS ?
    • πŸ”ΈIAM
    • πŸ”ΈEC2
      • User Data
      • Instance Types
      • Security Group
      • Purchasing Options
      • Placement Groups
      • Elastic Network Interface (ENI)
      • EC2 Hibernate
      • EC2 Storage
    • πŸ”ΈELB & ASG
      • Health Checks
      • Target Group
      • ELB Types
      • Sticky Sessions
      • Cross Zone Load Balancing
      • Load Balancer - SSL and SNI
      • Deregistration Delay
      • ASG
    • πŸ”ΈRDS & Aurora DB
      • RDS
        • Storage Auto Scaling
        • Read Replica
        • Multi AZ
        • RDS Custom
        • Backup
        • RDS Proxy
      • AWS Aurora
        • Read Replica
        • Endpoint and Auto Scaling
        • Aurora Serverless
        • Global Database
        • Machine Learning
        • Backup
        • Database Cloning
      • RDS & Aurora Restore options
      • RDS & Aurora Security
    • πŸ”ΈElastic Cache
    • πŸ”ΈRoute 53
      • Records
      • Hosted Zones
      • Health Check
      • Routing Policies
  • Backend Security
    • 🎩SQL Injection
    • 🎩Cross site script (XSS)
    • 🎩Cross site request forgery (CSRF)
    • 🎩Man in the Middle (MITM)
    • 🎩Insecure Direct Object Reference (IDOR)
    • 🎩Distributed denial of service (DDOS)
  • Medium
    • πŸ‘¨β€πŸ’»Gamer to Coder
    • 🐳Docker
      • Docker #1
      • Docker #2
    • πŸ’ŠDI and IOC
    • ☸️Kubernetes
  • Book
    • πŸ“šSystem Design Interview - An Insider's Guide (Volume 1
Powered by GitBook
On this page
  1. Scheduling

Taints and Tolerations

Describe about Taints and Tolerations

PreviousLabels and SelectorsNextNode Selector

Last updated 1 year ago

Taint is like a spray the we set set on Node after we spray on the Node we need to set toleration on Pod to make it can tolerant in that Node Example

From this example you will see Node 1 has taint blue and Node 2 , Node 3 has taint green.

So the Pod that tolerant for blue is A then Pod A will created on Node 1 but Pod B, C, and D it tolerant for green then it will got to Node 2 and Node 3 in order.

CheatSheet Command

  1. Taint Node: kubectl taint nodes <node_name> <key>=<value>:<taint_effect> There are 3 type of taint effect: NoSchedule, PreferNoSchedule and NoExecute

  2. Add the tolerant on Pod:

# Pod Template
apiVersion: v1
kind: Pod
metadata:
  name: myapp-pod
spec:
  containers:
  - name: nginx-container
    image: nginx
  tolerations:
  # all of below value need to have double quote
  - key: "app"  
    operator: "Equal" 
    value: "blue"
    effect: "NoSchedule"
  1. Remove taint from Node: kubectl taint node <node_name> <taint_name>:<taint_effect>-

NoSchedule

It mean avoid to create pod on the Node.

PreferNoSchedule It will avoid to have pod on the Node but it is not guarantee the Pod will be create on Node even the pod tolerant for taint on that Node

No Execute

It will avoid to have pod on the Node and If the existing pod does not tolerant for the taint it will be evict

☸️
Drawing