Differences between revisions 7 and 8
Revision 7 as of 2021-10-18 09:02:20
Size: 2343
Editor: PieterSmit
Comment:
Revision 8 as of 2021-10-19 08:03:35
Size: 2538
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
* kubeadm
  * deploys all the kubernetes services downloaded from web
 * kubeadm
  * deploys all the kubernetes services downloaded from web
Line 10: Line 10:
* Kube-Scheduler
  1. Filter Nodes (Pod cant fit)
  2. Rank Nodes (Compare resources left, try to balance cpu/mem usage)
 * Kube-Scheduler
  1. Filter Nodes (Pod cant fit)
  2. Rank Nodes (Compare resources left, try to balance cpu/mem usage)
Line 33: Line 33:
    * !ReplicaSets - Replication controller -> newer -> Replica Sets     * kind: !ReplicaSets - Replication controller -> newer -> Replica Sets
Line 63: Line 63:
              * kind: Deployments - Encapsulates ReplicaSet that Encapsulate Pods
   * Can have deployment and replacement policy


 * kind: ResourceQuote
   spec:
    hard:
      cpu:

         

k8s/StudyNotes

k8s/StudyNotes/cubectl k8s/StudyNotes/Deployments

  • https://kodekloud.com/

  • kubeadm
    • deploys all the kubernetes services downloaded from web
  • Kube-Scheduler
    1. Filter Nodes (Pod cant fit)
    2. Rank Nodes (Compare resources left, try to balance cpu/mem usage)
  • kubelet - captain on each Worker Node
  • Kube-proxy - run on each node, service's virtual component
    • All pods can see all other pods, through POD Network, by IP/Name. Exposed through service: eg. db(IP)
    • Watches for service creation, and then configure network e.g. Iptables to forward to actual pod.
    • Install: download wget to install or
      • kubeadm will deploy it as deamon set to each pod in namespace kube-system
  • PODs
    • smallest object in k8s, contains containers, can contain one or more containers
    • scale service by creating more pod instances.
    • additional container could be helper container.
    • network space is shared between containers in the same pod, they can communicate on localhost.
    • k8s Controllers - the brains
      • kind: ReplicaSets - Replication controller -> newer -> Replica Sets

        1. yml definition ReplicationController same 4 sections as other configs

          • apiVersion: v1
          • kind: ReplicationController

          • metadata:
            • name: myapp-rc labels:
              • app: myapp type: front-end
          • spec:
            • template:
              • <pod definition nested, with same 2 sections, metadata, spec>

              replicas: 3
        2. yml definition newer ReplicationSet, requires selector:

          • apiVersion: apps/v1
          • kind: ReplicaSet

          • metadata:
            • name: myapp-rc labels:
              • app: myapp type: front-end
          • spec:
            • template:
              • <pod definition nested, with same 2 sections, metadata, spec>

              replicas: 3 selector:
              • matchLabels:
                • type: front-end
  • kind: Deployments - Encapsulates ReplicaSet that Encapsulate Pods

    • Can have deployment and replacement policy
  • kind: ResourceQuote

    • spec:
      • hard:
        • cpu:

k8s/StudyNotes (last edited 2021-10-30 22:48:04 by PieterSmit)