SlideShare a Scribd company logo
1 of 17
CHECKIN
Kubernetes training course – Sep 2022 author: viettq
AGENDA
Kubernetes training course – Sep 2022 author: viettq
 Get to know each other
 What is Kubernetes
 Why Kubernetes
 Kubenetes architect
 Get to know how pod is created/deleted
 Summary
WHAT IS KUBERNETES?
Kubernetes training course – Sep 2022 author: viettq
WHAT IS KUBERNETES?
Kubernetes training course – Sep 2022 author: viettq
 In Greek mean “Pilot” or
 “Helmsman” of a ship
WHY USE KUBERNETES?
Kubernetes training course – Sep 2022 author: viettq
 Manage container at scale
 Declarative
 Self healing
 Service discovery
 Run anywhere
KUBERNETES ARCHITECT
Kubernetes training course – Sep 2022 author: viettq
kube-controller cloud-controller
kube-api-server
etcd
kube-scheduler
kubelet
kube-proxy
CRI
kubelet
kube-proxy
CRI
Worker Node Worker Node
Cloud
Control Plane Node
KUBERNETES ARCHITECT
Kubernetes training course – Sep 2022 author: viettq
kube-controller cloud-controller
kube-api-server
etcd
kube-scheduler
kubelet
kube-proxy
CRI
kubelet
kube-proxy
CRI
Worker Node Worker Node
Cloud
Master Node
MASTER NODE & WORKER NODE
KUBERNETES ARCHITECT
Kubernetes training course – Sep 2022 author: viettq
MASTER NODE & WORKER NODE
KUBERNETES ARCHITECT
Kubernetes training course – Sep 2022 author: viettq
 Kube-api-server
 etcd
 Kube-scheduler
 Kube-controller
 Cloud-controller
CONTROL PLANE NODE
KUBERNETES ARCHITECT
Kubernetes training course – Sep 2022 author: viettq
 Kubelet
 Kube-proxy
 Containter runtime interface (CRI)
 Docker
 Containerd
 Podman
KUBERNETES NODE
KUBERNETES RESOURCE
Kubernetes training course – Sep 2022 author: viettq
 Nodes
 Pods
 Service
 Deployment
 Replicaset
 Statefulset
.
 Daemonset
 Ingress
 Configmap
 PVC
 PV
 Secret
 Endpoint
 PodDisruptionPolicy
 Role/ClusterRole
 RoleBinding/ClusterRoleBinding
 …
KUBERNETES RESOURCE
Kubernetes training course – Sep 2022 author: viettq
 Init container
 Configure a database
 Do heathcheck
 Sidecar container
 Ship log (as a agent)
 Configure secrets
 Service Mesh
 Application container
 Microservice
 Database server
PODS
Pod
Init container
Sidecar container
Application container
POD CREATION FLOW
Kubernetes training course – Sep 2022 author: viettq
WHAT IS HAPPENING
 How is a pod created?
POD CREATION FLOW
Kubernetes training course – Sep 2022 author: viettq
WHAT IS HAPPENING
 How is a pod created?
POD DELETION FLOW
Kubernetes training course – Sep 2022 author: viettq
WHAT IS HAPPENING
SUMMARY
Kubernetes training course – Sep 2022 author: viettq
.
 Control plane node vs Kubernetes node (Master node vs Worker node)
 K8S Components
 K8S resource: Namespace level vs Cluster level
 Pod creation/deletion flow
Q&A
ASK ME ANYTHING
Kubernetes training course – Sep 2022 author: viettq
.

More Related Content

Similar to k8s-course-session01-overview.pptx

Similar to k8s-course-session01-overview.pptx (20)

Kubernetes day 2 Operations
Kubernetes day 2 OperationsKubernetes day 2 Operations
Kubernetes day 2 Operations
 
FIWARE Global Summit - Leveraging Kubernetes for FIWARE Components Automations
FIWARE Global Summit - Leveraging Kubernetes for FIWARE Components AutomationsFIWARE Global Summit - Leveraging Kubernetes for FIWARE Components Automations
FIWARE Global Summit - Leveraging Kubernetes for FIWARE Components Automations
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
Docker Dublin Meetup | 22 Feb 2018 | Docker + Kubernetes
Docker Dublin Meetup | 22 Feb 2018 | Docker + KubernetesDocker Dublin Meetup | 22 Feb 2018 | Docker + Kubernetes
Docker Dublin Meetup | 22 Feb 2018 | Docker + Kubernetes
 
Andrea Tosatto - Kubernetes Beyond - Codemotion Milan 2017
Andrea Tosatto - Kubernetes Beyond - Codemotion Milan 2017Andrea Tosatto - Kubernetes Beyond - Codemotion Milan 2017
Andrea Tosatto - Kubernetes Beyond - Codemotion Milan 2017
 
Tectonic Summit 2016: Brandon Philips, CTO of CoreOS, Keynote
Tectonic Summit 2016: Brandon Philips, CTO of CoreOS, KeynoteTectonic Summit 2016: Brandon Philips, CTO of CoreOS, Keynote
Tectonic Summit 2016: Brandon Philips, CTO of CoreOS, Keynote
 
Kubernetes extensibility
Kubernetes extensibilityKubernetes extensibility
Kubernetes extensibility
 
Serverless with Knative - Mete Atamel (Google)
Serverless with Knative - Mete Atamel (Google)Serverless with Knative - Mete Atamel (Google)
Serverless with Knative - Mete Atamel (Google)
 
Kubernetes für Workstations Edge und IoT Devices
Kubernetes für Workstations Edge und IoT DevicesKubernetes für Workstations Edge und IoT Devices
Kubernetes für Workstations Edge und IoT Devices
 
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
 
KubeCon EU 2021 Recap - Running Cache-Efficient Builds at Scale on Kubernetes...
KubeCon EU 2021 Recap - Running Cache-Efficient Builds at Scale on Kubernetes...KubeCon EU 2021 Recap - Running Cache-Efficient Builds at Scale on Kubernetes...
KubeCon EU 2021 Recap - Running Cache-Efficient Builds at Scale on Kubernetes...
 
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES HAS NEVER BEEN SO EASY
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES HAS NEVER BEEN SO EASYKUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES HAS NEVER BEEN SO EASY
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES HAS NEVER BEEN SO EASY
 
Toronto RHUG: Container-native virtualization
Toronto RHUG: Container-native virtualizationToronto RHUG: Container-native virtualization
Toronto RHUG: Container-native virtualization
 
Kubernetes Basis: Pods, Deployments, and Services
Kubernetes Basis: Pods, Deployments, and ServicesKubernetes Basis: Pods, Deployments, and Services
Kubernetes Basis: Pods, Deployments, and Services
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Effective Building your Platform with Kubernetes == Keep it Simple
Effective Building your Platform with Kubernetes == Keep it Simple Effective Building your Platform with Kubernetes == Keep it Simple
Effective Building your Platform with Kubernetes == Keep it Simple
 
DCEU 18: Docker Container Networking
DCEU 18: Docker Container NetworkingDCEU 18: Docker Container Networking
DCEU 18: Docker Container Networking
 
Kubernetes-Fundamentals.pptx
Kubernetes-Fundamentals.pptxKubernetes-Fundamentals.pptx
Kubernetes-Fundamentals.pptx
 
Kubernetes Kops - Automation Night
Kubernetes Kops - Automation NightKubernetes Kops - Automation Night
Kubernetes Kops - Automation Night
 

Recently uploaded

Recently uploaded (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

k8s-course-session01-overview.pptx

  • 1. CHECKIN Kubernetes training course – Sep 2022 author: viettq
  • 2. AGENDA Kubernetes training course – Sep 2022 author: viettq  Get to know each other  What is Kubernetes  Why Kubernetes  Kubenetes architect  Get to know how pod is created/deleted  Summary
  • 3. WHAT IS KUBERNETES? Kubernetes training course – Sep 2022 author: viettq
  • 4. WHAT IS KUBERNETES? Kubernetes training course – Sep 2022 author: viettq  In Greek mean “Pilot” or  “Helmsman” of a ship
  • 5. WHY USE KUBERNETES? Kubernetes training course – Sep 2022 author: viettq  Manage container at scale  Declarative  Self healing  Service discovery  Run anywhere
  • 6. KUBERNETES ARCHITECT Kubernetes training course – Sep 2022 author: viettq kube-controller cloud-controller kube-api-server etcd kube-scheduler kubelet kube-proxy CRI kubelet kube-proxy CRI Worker Node Worker Node Cloud Control Plane Node
  • 7. KUBERNETES ARCHITECT Kubernetes training course – Sep 2022 author: viettq kube-controller cloud-controller kube-api-server etcd kube-scheduler kubelet kube-proxy CRI kubelet kube-proxy CRI Worker Node Worker Node Cloud Master Node MASTER NODE & WORKER NODE
  • 8. KUBERNETES ARCHITECT Kubernetes training course – Sep 2022 author: viettq MASTER NODE & WORKER NODE
  • 9. KUBERNETES ARCHITECT Kubernetes training course – Sep 2022 author: viettq  Kube-api-server  etcd  Kube-scheduler  Kube-controller  Cloud-controller CONTROL PLANE NODE
  • 10. KUBERNETES ARCHITECT Kubernetes training course – Sep 2022 author: viettq  Kubelet  Kube-proxy  Containter runtime interface (CRI)  Docker  Containerd  Podman KUBERNETES NODE
  • 11. KUBERNETES RESOURCE Kubernetes training course – Sep 2022 author: viettq  Nodes  Pods  Service  Deployment  Replicaset  Statefulset .  Daemonset  Ingress  Configmap  PVC  PV  Secret  Endpoint  PodDisruptionPolicy  Role/ClusterRole  RoleBinding/ClusterRoleBinding  …
  • 12. KUBERNETES RESOURCE Kubernetes training course – Sep 2022 author: viettq  Init container  Configure a database  Do heathcheck  Sidecar container  Ship log (as a agent)  Configure secrets  Service Mesh  Application container  Microservice  Database server PODS Pod Init container Sidecar container Application container
  • 13. POD CREATION FLOW Kubernetes training course – Sep 2022 author: viettq WHAT IS HAPPENING  How is a pod created?
  • 14. POD CREATION FLOW Kubernetes training course – Sep 2022 author: viettq WHAT IS HAPPENING  How is a pod created?
  • 15. POD DELETION FLOW Kubernetes training course – Sep 2022 author: viettq WHAT IS HAPPENING
  • 16. SUMMARY Kubernetes training course – Sep 2022 author: viettq .  Control plane node vs Kubernetes node (Master node vs Worker node)  K8S Components  K8S resource: Namespace level vs Cluster level  Pod creation/deletion flow
  • 17. Q&A ASK ME ANYTHING Kubernetes training course – Sep 2022 author: viettq .

Editor's Notes

  1. Container Orchestration: Là hệ thống điều phối container để tự động hóa việc triển khai, mở rộng và quản lý phần mềm. Google ban đầu thiết kế Kubernetes, nhưng Cloud Native Computing Foundation hiện vẫn duy trì dự án
  2. Container Orchestration: Là hệ thống điều phối container để tự động hóa việc triển khai, mở rộng và quản lý phần mềm. Google ban đầu thiết kế Kubernetes, nhưng Cloud Native Computing Foundation hiện vẫn duy trì dự án
  3. Container Orchestration: Là hệ thống điều phối container để tự động hóa việc triển khai, mở rộng và quản lý phần mềm. Google ban đầu thiết kế Kubernetes, nhưng Cloud Native Computing Foundation hiện vẫn duy trì dự án
  4. Quản lý số lượng lớn các container so với sử dụng docker on baremetal. Declarative  Có tính chất khai báo. Các resource của k8s đều có thể khai báo một cách rõ ràng và trong sáng dưới dạng yaml Self healing  Cơ chế tự sửa lỗi. Ý tưởng này giống Vmware. Vmware restart service 3 lần, restart VM.. Thì k8s có cơ chế restart pod (hết limit ram, exception..), tạo ra pod mới nếu không đủ số pod healthy.. Một cách tự động Service discovery  Tính năng rất quan trọng của k8s. Ví dụ ta triển khai một ứng dụng như smch-api-server gồm 3 pod Mỗi pod có 1 ip riêng, và các pod hoàn toàn có thể bị xoá đi tạo lại trong quá trình hoạt động do đó IP cũng thay đổi liên lục. Lúc này service discovery giúp chúng ta giải quyết vấn đề này. Service sẽ cung cấp một ip ảo (VIP) cho toàn bộ các Pod phía sau nó. Chúng ta sẽ tìm hiểu kỹ hơn các phần tiếp theo khi tìm hiểu về service trên k8s Run anywhere: Chạy trên baremetal, VM, cloud..
  5. Lưu ý CRI không thuộc thành phần của k8s nhưng nó bắt buộc phải có ở các worker node để đảm bảo các container có môi trường để chạy. Nó hỗ trợ CRI như docker, containerd và podman. Sắp tới phiên bản mới của k8s sẽ không còn hỗ trợ docker nữa  Sẽ dần chuyển sang containerd
  6. Cần nhớ rõ 2 khái niệm: Master node >< Worker Node Master cũng có thể đóng vai trò worker tức là nhận workload
  7. Kiểm tra vai trò của node trong k8s, có cột role hiển thị rõ rang vai trò của node trong cluster
  8. Các thành phần chính của Control Plane: Với hệ thống onpremis thì phần cloud-controller là không sử dụng tới. Ta chỉ quan tâm 4 thành phần chính: etcd + api + scheduler + controller manager
  9. Thành phần Kubernetes node gồm 2 phần chính: kubelete và kubeproxy Kubelete: Quản lý node, cập nhật trạng thái của node cũng nhưng các workload mà node đang quản lý Cập nhật thông tin từ apiserver về node: Yêu cầu thêm/sửa/xóa các workload trên node (như pod, deployment..) Kube-proxy: Làm nhiệm vụ kiểm soát các rule kết nối đến và đi tới node. Nó đảm bảo kết nối giữa các pod trong mạng của k8s. Các CRI phổ biến có 3 loại. Hiện tại tất cả các hệ thống của khối SMC đều dùng docker
  10. Các tài nguyên trên k8s khá đa đạng, trong đó ta sẽ quan tâm tới các tài nguyên mà ta thường xuyên phải sử dụng tới. Lưu ý khái niệm namespace: Cũng là một tài nguyên của k8s. Nó làm nhiệm vụ phân tách các nhóm tài nguyên trong một cụm k8s cluster. Tên của các tài nguyên bên trong mỗi namespace phải là duy nhất. Các tài nguyên ở các ns khác nhau thì có thể trùng nhau. Namespace chỉ sử dụng với các resource mức namespace chứ không dung cho tài nguyên mức cluster (như node, storage class, PV..) Các tài nguyên trên k8s chia làm 2 loại: Mức namespace và mức cluster  Cần nhớ kỹ 2 khái niệm này.
  11. Pod là đơn vị nhỏ nhất trong k8s mà ta có thể quản lý. Tuy trong nó còn có các container nhưng việc quản lý container là của pod. Ta chỉ có thể tạo/sửa/xoá pod chứ ko thể sửa/xoá một container trong một pod đang chạy được. Pod có thể chứa một hoặc nhiều container có quan hệ mật thiết với nhau. Init container: Được thực thi trong khi khởi động pod. Thường được ứng dụng để thực hiện các tác vụ health check hoặc các tác vụ preconfig Sidecar containers là các container mà chạy bên cạnh application containers ở trong một Pod, nó sẽ có nhiệm vụ mở rộng và hỗ trợ chức năng cho application containers. Ví dụ như gửi log từ main container sang log agent. Một ví dụ nữa của sidecar là khi dùng với vault, nó sẽ làm nhiệm vụ lấy thông tin credential về cho Pod. Sidecar dùng cho service mesh. Khi cài đặt service mesh thì khi tạo một pod mới, service mesh sẽ tự động them vào một sidecar container vào pod đó để làm nhiệm vụ service mesh App container: Là container chính mà ta chạy ứng dụng. Pod được cấp IP, được cấp tài nguyên RAM/CPU để thực thi. IP do k8s cấp, tài nguyên do ta định nghĩa (hoặc có thể không định nghĩa) khi tạo pod.