Search This Blog

Monday, 21 February 2022

K8s

  1. Master & Worker nodes 
  2. 3 processes run on every worker node 
    1. Container Runtime
    2. Kubelet
    3. Kube Proxy
  3.  How to  
    1. schedule pod?
    2. monitor?
    3. re-schedule/re-start pod?
    4. join a new node?
      1. all these actions taken care by master node
  4. 4 Processes run on every Master node
    1. API server
      1. Cluster gateway
      2. Acts as a gatekeeper for authentication
    2. Scheduler
      1. Scheduler
        1. Schedule new pod ->API Server -> Scheduler -> Where to put the pod? (Scheduler just decides on which Node new pod should be scheduled based on several criteria ex. less used node ) -> Kubelet will take the request and deploy the pod
      2. Controller Manager
        1. Detects cluster state changes, example if pod die Controller manager will detect that and tries to recover cluster state ASAP. 
        2. Controller Manager -> Scheduler -> Kubelet  -> restart the pod
      3. etcd
        1. key Value Store
        2. cluster brain
        3. For example if pod dies all the Cluster changes get stored in the Key Value Store
        4. How remaining process utilize this etecd data
          1. API Server - Is the cluster healthy ?
          2. Scheduler - What resources are available?
          3. Controller manager - Did the cluster state changed?
        5. Application data is not stored in etcd
        6. etcd stores just cluster state information 
  5. API server is load balanced between master nodes 
  6. etcd Distributed storage across all master nodes 

Ansible_Notes

   ansible -i inventory.ini -m ping all   # inventory.ini it will ping to the hosts which are in inventory # ansible -i inventory.ini -m pin...