Kubernetes Architecture
2 ‫ي‬ ‫ب‬ ‫بال‬ ‫ت‬ ‫ي‬ ‫ز‬ ‫ب‬ ‫ي‬ ‫ك‬
‫اﻟﺷﺎﻋري‬ ‫ﻋﺑداﻟﻌﻠﯾم‬ ‫وﻟﯾد‬
@walidshaari
https://www.linkedin.com/in/walidshaari
https://github.com/walidshaari
background image credit: https://commons.wikimedia.org/wiki/File:Social_Network_Analysis_Visualization.png
Most of the non-original slides were collected and through the awesome @Kubernauts
https://twitter.com/kubernauts/status/1273683673662074886
>kubectl get plan
1. Quick review of last meetup ‫اﻟﻣﺎﺿﻲ‬ ‫ﻟﻠﻘﺎء‬ ‫ﺳرﯾﻌﺔ‬ ‫ﻣراﺟﻌﺔ‬
2. Step back and try to look at the bigger picture ‫واﻟﻛﯾوﺑرﻧﺗﯾس‬ ‫اﻟﺣﺎوﯾﺎت‬ ‫ﺗﻘﻧﯾﺔ‬ ‫ﻣﻛﺎﻧﺔ‬
3. why we are doing this? what is the end goal? ‫اﻟﻔواﺋد؟‬ ‫ﻣﺎھﻲ‬ ‫ﻟﻣﺎذا؟‬
4. Can we expand our minds about the container possibility and its use cases for our learning
Journey?
5. Expose and debate the Kubernetes architecture ‫ﻛﯾوﺑرﻧﺗﯾس‬ ‫ﻟﻌﻣﺎرة‬ ‫ﻋﻣﻠﯾﺔ‬ ‫ﻣﻧﺎﻗﺷﺔ‬
a. via what gets created when you provision a cluster ‫ﻛﻠﺳﺗر‬ ‫إﻧﺷﺎء‬ ‫ﺧﻼل‬ ‫ﻣن‬
b. What happens when you provision a simple primitive ‫ﺑﺳﯾط‬ ‫ﺗطﺑﯾق‬ ‫إﻧﺷﺎء‬ ‫ﻋﻧد‬ ‫ﯾﺣدث‬ ‫ﻣﺎذا‬
>kubectl get user
‫ي‬ ‫ا‬ ‫ال‬ ‫ي‬ ‫ال‬ ‫ب‬ ‫ي‬ ‫ل‬
@walidshaari
https://www.linkedin.com/in/walidshaari
https://github.com/walidshaari/Kubernetes-Certified-Administrator
● Analytics Infrastructure engineer
● Deployed and Supported large scale distributed HPC Linux clusters
● Configuration management evaluation and deployment project in 2014
● Advocating open source, automation, containers and Kubernetes
● Leading SAudi eastern province “Sharqaya” Dammam Docker, and AWS meetups
• Standardized packaging for software and
dependencies
• Isolate apps from each other
• Share the same host OS kernel
• Utilizes Linux Kernel features (e.g.
namespace, cgroups, apparmor, selinux)
• Microsoft have Windows Native Containers
• Lightweight application virtualization
• Consolidate 100s of applications per host
compared to 10s per vm
Review: containers? ‫ت‬ ‫يا‬ ‫ا‬ ‫ا‬
Build, distribute, and run applications almost anywhere
‫ت‬ ‫ي‬ ‫ز‬ ‫ب‬ ‫ي‬ ‫ك‬
5
https://twitter.com/kelseyhightower/status/935252923721793536
https://twitter.com/VMwareDesign/status/1257400427630530562
Application Delivery
‫ت‬ ‫ا‬ ‫ت‬ ‫ي‬ ‫ب‬ ‫ت‬ ‫ال‬ ‫ة‬ ‫ت‬
App
Application Portability
Ap
p
App
App
App
App
App
FOCUS ON CORE MISSION
‫ة‬ ‫ي‬ ‫أساس‬‫ال‬ ‫ة‬ ‫بالمهم‬ ‫ز‬ ‫ي‬ ‫ك‬ ‫ت‬ ‫ال‬
Less time spent on
Infrastructure
More time to concentrate on new
initiatives, activities and projects
More resources freed for
innovation
Virtualization
Operating System
Hardware
Application
Functions
Containers
Runtime
Types of Cloud Computing
Virtualization
Operating System
Hardware
Application
Functions
Containers
Runtime
Virtualization
Operating System
Hardware
Application
Functions
Containers
Runtime
Customer Managed
Customer Managed unit of scale
Provider Operated and Managed
Infrastructure as a Service
FaaS
Platform as a Service Function as a Service
PaaSIaaS
Example Enterprise Kubernetes
Infrastructure
Gitlab/Github/Bitbucket Services
Application source code
Domain Name Servers
Service and host discovery
EFK Stack
Audits and logs
Prometheus &
Grafana
Monitoring
Infrastructure
Control plane
Application nodes
Microsoft Active Directory
Corporate authentication and
authorization
Nexus Repository
Application artifacts repository integration
Enterprise NFS/ISCSI filers
Persistent Dynamic storage
HA Proxy
Service routing and Load balancing
Red Hat Satellite & Nexus
Registry
System and application package
life cycle management
https://landscape.cncf.io/
Ecosystem
Kubernetes’ High-Level Architecture Overview
Creating a single worker node cluster
https://asciinema.org/a/24jLJkCjDmmOeAGdyu6ul9Mci
https://asciinema.org/a/24jLJkCjDmmOeAGdyu6ul9Mci
Controller watch loop
‫اﻟﺗﺣﻛم‬ ‫دورة‬
Replica Controller
-..-.-..-.-.-..-.
Desired State:
apiVersion: apps/v1
kind: Deployment
metadata:
name: coredns
labels:
app: nginx
spec:
replicas: 2
=-...-.-=..
Current State
-
Source: Kubernetes effect by Bilgin Ibryam
Application dependency on Kubernetesprimitives
Scott McCarty Twitter: @fatherlinux Blog: bit.ly/fatherlinux
REGISTRY
Better than virtual appliance market places :-)
Defines a standard way to:
● Find images
● Run images
● Build new images
● Share images
● Pull images
● Introspect images
● Shell into running container
● Etc, etc, etc
Kubernetes’ High-Level Architecture Overview
Source: https://www.weave.works/blog/what-does-production-ready-really-mean-for-a-kubernetes-cluster
Kubernetes Components
Source: https://kubernetes.io/docs/concepts/overview/components/#master-components
A Typical Flow: How K8s API works
Source: https://blog.heptio.com/core-kubernetes-jazz-improv-over-orchestration-a7903ea92ca
Running the container image in Kubernetes
Source: Kubernetes in Action book by Marko Lukša
https://azure.microsoft.com/en-us/resources/kubernetes-learning-path/
‫؟‬ ‫ب‬ ‫ا‬ ‫ز‬ ‫ا‬
ً‫ا‬‫ﺷﻛر‬
https://www.katacoda.com
Inside Kind control-plane container
https://asciinema.org/a/348641
https://twitter.com/Chuckernetes/status/1169690858578481153/photo/1
Kubernetes Component Flow
Source: https://medium.com/payscale-tech/imperative-vs-declarative-a-kubernetes-tutorial-4be66c5d8914
Kubernetes Component Flow
Source: https://medium.com/cloud-heroes/exploring-the-flexibility-of-kubernetes-9f65db2360a0
VMs vs. Containers
Comparing Containers and VMs
Containers are an app
level construct
VMs are an infrastructure level
construct to turn one machine
into many servers
Containers and VMs together
Containers and VMs together provide a tremendous amount of
flexibility for IT to optimally deploy and manage apps.
How to build an event driven, dynamically reconfigurable microservices platform by Sven
Beauprez:

K8s architecture meetup2- k8saraby

  • 1.
    Kubernetes Architecture 2 ‫ي‬‫ب‬ ‫بال‬ ‫ت‬ ‫ي‬ ‫ز‬ ‫ب‬ ‫ي‬ ‫ك‬ ‫اﻟﺷﺎﻋري‬ ‫ﻋﺑداﻟﻌﻠﯾم‬ ‫وﻟﯾد‬ @walidshaari https://www.linkedin.com/in/walidshaari https://github.com/walidshaari background image credit: https://commons.wikimedia.org/wiki/File:Social_Network_Analysis_Visualization.png Most of the non-original slides were collected and through the awesome @Kubernauts https://twitter.com/kubernauts/status/1273683673662074886
  • 2.
    >kubectl get plan 1.Quick review of last meetup ‫اﻟﻣﺎﺿﻲ‬ ‫ﻟﻠﻘﺎء‬ ‫ﺳرﯾﻌﺔ‬ ‫ﻣراﺟﻌﺔ‬ 2. Step back and try to look at the bigger picture ‫واﻟﻛﯾوﺑرﻧﺗﯾس‬ ‫اﻟﺣﺎوﯾﺎت‬ ‫ﺗﻘﻧﯾﺔ‬ ‫ﻣﻛﺎﻧﺔ‬ 3. why we are doing this? what is the end goal? ‫اﻟﻔواﺋد؟‬ ‫ﻣﺎھﻲ‬ ‫ﻟﻣﺎذا؟‬ 4. Can we expand our minds about the container possibility and its use cases for our learning Journey? 5. Expose and debate the Kubernetes architecture ‫ﻛﯾوﺑرﻧﺗﯾس‬ ‫ﻟﻌﻣﺎرة‬ ‫ﻋﻣﻠﯾﺔ‬ ‫ﻣﻧﺎﻗﺷﺔ‬ a. via what gets created when you provision a cluster ‫ﻛﻠﺳﺗر‬ ‫إﻧﺷﺎء‬ ‫ﺧﻼل‬ ‫ﻣن‬ b. What happens when you provision a simple primitive ‫ﺑﺳﯾط‬ ‫ﺗطﺑﯾق‬ ‫إﻧﺷﺎء‬ ‫ﻋﻧد‬ ‫ﯾﺣدث‬ ‫ﻣﺎذا‬
  • 3.
    >kubectl get user ‫ي‬‫ا‬ ‫ال‬ ‫ي‬ ‫ال‬ ‫ب‬ ‫ي‬ ‫ل‬ @walidshaari https://www.linkedin.com/in/walidshaari https://github.com/walidshaari/Kubernetes-Certified-Administrator ● Analytics Infrastructure engineer ● Deployed and Supported large scale distributed HPC Linux clusters ● Configuration management evaluation and deployment project in 2014 ● Advocating open source, automation, containers and Kubernetes ● Leading SAudi eastern province “Sharqaya” Dammam Docker, and AWS meetups
  • 4.
    • Standardized packagingfor software and dependencies • Isolate apps from each other • Share the same host OS kernel • Utilizes Linux Kernel features (e.g. namespace, cgroups, apparmor, selinux) • Microsoft have Windows Native Containers • Lightweight application virtualization • Consolidate 100s of applications per host compared to 10s per vm Review: containers? ‫ت‬ ‫يا‬ ‫ا‬ ‫ا‬ Build, distribute, and run applications almost anywhere
  • 5.
    ‫ت‬ ‫ي‬ ‫ز‬‫ب‬ ‫ي‬ ‫ك‬ 5 https://twitter.com/kelseyhightower/status/935252923721793536 https://twitter.com/VMwareDesign/status/1257400427630530562
  • 6.
    Application Delivery ‫ت‬ ‫ا‬‫ت‬ ‫ي‬ ‫ب‬ ‫ت‬ ‫ال‬ ‫ة‬ ‫ت‬ App Application Portability Ap p App App App App App
  • 7.
    FOCUS ON COREMISSION ‫ة‬ ‫ي‬ ‫أساس‬‫ال‬ ‫ة‬ ‫بالمهم‬ ‫ز‬ ‫ي‬ ‫ك‬ ‫ت‬ ‫ال‬ Less time spent on Infrastructure More time to concentrate on new initiatives, activities and projects More resources freed for innovation
  • 8.
    Virtualization Operating System Hardware Application Functions Containers Runtime Types ofCloud Computing Virtualization Operating System Hardware Application Functions Containers Runtime Virtualization Operating System Hardware Application Functions Containers Runtime Customer Managed Customer Managed unit of scale Provider Operated and Managed Infrastructure as a Service FaaS Platform as a Service Function as a Service PaaSIaaS
  • 9.
    Example Enterprise Kubernetes Infrastructure Gitlab/Github/BitbucketServices Application source code Domain Name Servers Service and host discovery EFK Stack Audits and logs Prometheus & Grafana Monitoring Infrastructure Control plane Application nodes Microsoft Active Directory Corporate authentication and authorization Nexus Repository Application artifacts repository integration Enterprise NFS/ISCSI filers Persistent Dynamic storage HA Proxy Service routing and Load balancing Red Hat Satellite & Nexus Registry System and application package life cycle management
  • 10.
  • 11.
  • 12.
    Creating a singleworker node cluster https://asciinema.org/a/24jLJkCjDmmOeAGdyu6ul9Mci
  • 13.
  • 14.
    Controller watch loop ‫اﻟﺗﺣﻛم‬‫دورة‬ Replica Controller -..-.-..-.-.-..-. Desired State: apiVersion: apps/v1 kind: Deployment metadata: name: coredns labels: app: nginx spec: replicas: 2 =-...-.-=.. Current State -
  • 15.
    Source: Kubernetes effectby Bilgin Ibryam Application dependency on Kubernetesprimitives
  • 16.
    Scott McCarty Twitter:@fatherlinux Blog: bit.ly/fatherlinux REGISTRY Better than virtual appliance market places :-) Defines a standard way to: ● Find images ● Run images ● Build new images ● Share images ● Pull images ● Introspect images ● Shell into running container ● Etc, etc, etc
  • 17.
    Kubernetes’ High-Level ArchitectureOverview Source: https://www.weave.works/blog/what-does-production-ready-really-mean-for-a-kubernetes-cluster
  • 18.
  • 19.
    A Typical Flow:How K8s API works Source: https://blog.heptio.com/core-kubernetes-jazz-improv-over-orchestration-a7903ea92ca
  • 20.
    Running the containerimage in Kubernetes Source: Kubernetes in Action book by Marko Lukša
  • 21.
  • 22.
  • 23.
  • 26.
    Inside Kind control-planecontainer https://asciinema.org/a/348641
  • 27.
  • 28.
    Kubernetes Component Flow Source:https://medium.com/payscale-tech/imperative-vs-declarative-a-kubernetes-tutorial-4be66c5d8914
  • 29.
    Kubernetes Component Flow Source:https://medium.com/cloud-heroes/exploring-the-flexibility-of-kubernetes-9f65db2360a0
  • 30.
  • 31.
    Comparing Containers andVMs Containers are an app level construct VMs are an infrastructure level construct to turn one machine into many servers
  • 32.
    Containers and VMstogether Containers and VMs together provide a tremendous amount of flexibility for IT to optimally deploy and manage apps.
  • 33.
    How to buildan event driven, dynamically reconfigurable microservices platform by Sven Beauprez: