O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.
Kubernetes and CNCF
Landscape 101
Giulio Roggero
Founder and CTO Mia-Platform
2https://landscape.cncf.io/
3https://landscape.cncf.io/
4https://landscape.cncf.io/
5https://landscape.cncf.io/
Process
6
Un sistema operativo gestisce
processi, schedulandoli e
fornendogli le risorse per
funzionare in modo corretto
Process
7
Cosa ha bisogno di un processo per girare?
Process
8
CPU per far girare le logiche
Process
9
Memoria per gestire i dati in
modo veloce
Process
10
Disco per salvare i dati in modo
persistente
Process
11
Networking per poter
comunicare con l’esterno
Process ProcessProcess
12
I processi
sono più di
uno alla vota,
centinaia!
A B C
Se avessi più macchine?
A B C
Process ProcessProcess
… e volessi
distribuire i
processi su
più macchine
A B C
Process ProcessProcess
Ho bisogno di 2
repliche
Ho bisogno di 4
repliche
Ho bisogno di 3
repliche
… e volessi
replic...
A B C
Process
Orchestration
Process
Scheduling
A B C
Process
Orchestration
2 instances
Process
Scheduling
A B C
Process
Orchestration
2 instances
Process
Scheduling
Go on
A and B
ProcessProcess
A B C
Process
Orchestration
2 instances
Process
Scheduling
Go on
A and B
Process Process ProcessProcess Process
A B C
Process
Orchestration
2 instances 3 instances
Process
Scheduling
Go on
A and ...
Process Process ProcessProcessProcess ProcessProcess ProcessProcess
A B C
Process
Orchestration
2 instances 3 instances 4 ...
Process Process ProcessProcessProcess ProcessProcess ProcessProcess
A is broken! B C
Process
Orchestration
2 instances 3 i...
Process Process ProcessProcessProcess ProcessProcessProcess Process
A is broken! B C
Process
Orchestration
2 instances 3 i...
24
Come funziona nel dettaglio
25
26
Per maggiori dettagli si rimanda alla documentazione ufficiale di Kubernetes
https://kubernetes.io/docs/concepts/overvi...
Un cluster k8s è
27
A B C
Virtualization
A B C
Virtualization
Master Master
Worker
Node
Worker
Node
Worker
Node
Worker
Node
Worker
Node
Worker
Node
A B C
Kubernetes
Virtualization
Master Master
Worker
Node
Worker
Node
Worker
Node
Worker
Node
Worker
Node
Worker
Node
A B C
Kubernetes
Virtualization
Master Master
Worker
Node
Worker
Node
Worker
Node
Worker
Node
Worker
Node
Worker
Node
Namespaces...
Kubernetes
Virtualization
Master Master
Worker
Node
Worker
Node
Worker
Node
Worker
Node
Worker
Node
Worker
Node
Namespaces...
Kubernetes
Virtualization
Master Master
Worker
Node
Worker
Node
Worker
Node
Worker
Node
Worker
Node
Worker
Node
Namespaces...
35
Distro, Hosting, Installer e PaaS di K8S
https://landscape.cncf.io/
36
Distro, Hosting, Installer e PaaS di K8S
https://landscape.cncf.io/
Come configuro un pod su k8s?
37
38
https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/
Kubernetes
Namespace
Worker
Node
Wor...
39
https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/
Kubernetes
Namespace
Worker
Node
Wor...
40
https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/
Kubernetes
Namespace
Worker
Node
Wor...
41
https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/
Kubernetes
Namespace
Worker
Node
Wor...
42
https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/
Kubernetes
Namespace
Worker
Node
Wor...
43
https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/
Kubernetes
Namespace
Worker
Node
Wor...
44
https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/
Kubernetes
Namespace
Worker
Node
Wor...
45
https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/
Kubernetes
Namespace
Worker
Node
Wor...
46
https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/
Kubernetes
Namespace
Pod
redis
Conta...
47
https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/
Kubernetes
Namespace
Worker
Node...
48
https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/
Kubernetes
Namespace
Worker
Node...
49
https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/
Kubernetes
Namespace
Worker
Node...
50
https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/
Kubernetes
Namespace
Worker
Node...
51
https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/
Kubernetes
Namespace
Worker
Node...
52
https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/
Kubernetes
Namespace
Pod
nginx-....
53Tutte le risorse: https://kubernetes.io/docs/reference/kubectl/overview/
54Tutte le risorse: https://kubernetes.io/docs/reference/kubectl/overview/
55
56
Rilasciare su k8s
57
58
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Git Repo
Code
59
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Git Repo
Code Pipeline
Docker Registry
Image
60
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Git Repo
Code Pipeline
Docker Registry
Image
yaml conf
61
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Git Repo
Code
yaml conf
Pipeline
Docker Registry
Image
Pipelin...
62
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Git Repo
Code
Yaml conf
Pipeline
Docker Registry
Image
Pipelin...
63
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Git Repo
Code
Yaml conf
Pipeline
Docker Registry
Image
Pipelin...
64
65
Rotte di salute
66
67
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
/-/ready
È pronto per ricevere traffico?
readinessPr...
68
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
/-/ready
La readiness dice ok!
readinessProbe
http...
69
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
/-/ready
Il service manda il traffico al Pod!
readin...
70
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
/-/ready
Se ci mette molto tempo è consigliabile a...
71
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
/-/ready
https://kubernetes.io/docs/tasks/configur...
72
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
/-/ready
https://kubernetes.io/docs/tasks/configur...
73
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
/-/ready
https://kubernetes.io/docs/tasks/configur...
74
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
/-/ready
https://kubernetes.io/docs/tasks/configur...
75
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
/-/ready
https://kubernetes.io/docs/tasks/configur...
76
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
/-/ready
https://kubernetes.io/docs/tasks/configur...
77
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
/-/ready
https://kubernetes.io/docs/tasks/configur...
78
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
/-/ready
https://kubernetes.io/docs/tasks/configur...
79
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
/-/ready
https://kubernetes.io/docs/tasks/configur...
Metriche
80
81
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
https://kubernetes.io/docs/tasks/configure-pod-con...
82
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
https://kubernetes.io/docs/tasks/configure-pod-con...
83
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
https://kubernetes.io/docs/tasks/configure-pod-con...
84
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
https://kubernetes.io/docs/tasks/configure-pod-con...
85
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Service
https://kubernetes.io/docs/tasks/configure-pod-contain...
86
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
https://kubernetes.io/docs/tasks/configure-pod-con...
87
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
https://kubernetes.io/docs/tasks/configure-pod-con...
88
89
Logs
90
91
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
https://kubernetes.io/docs/tasks/configure-pod-con...
92
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
https://kubernetes.io/docs/tasks/configure-pod-con...
93
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
https://kubernetes.io/docs/tasks/configure-pod-con...
94
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
https://kubernetes.io/docs/tasks/configure-pod-con...
95
96
Tracing
97
98
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
https://kubernetes.io/docs/tasks/configure-pod-con...
99
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
https://kubernetes.io/docs/tasks/configure-pod-con...
100
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
https://kubernetes.io/docs/tasks/configure-pod-co...
101
102
Canary Release
103
104
Canary Deploy
Gateway
/api/*
Products Namespace
Catalogue
Purchase Namespace
Cart Payment
Gateway
Pricing Namespace
Pr...
105
Canary Deploy
Gateway
/api/*
Products Namespace
Catalogue
Purchase Namespace
Cart Payment
Gateway
Pricing Namespace
Pr...
106
Canary Deploy
Gateway
/api/*
Products Namespace
Catalogue
Purchase Namespace
Cart Payment
Gateway
Pricing Namespace
Pr...
107
Canary Deploy
Gateway
/api/*
Products Namespace
Catalogue
Purchase Namespace
Cart Payment
Gateway
Pricing Namespace
Pr...
108
Canary Deploy
Gateway
/api/*
Products Namespace
Catalogue
Purchase Namespace
Cart Payment
Gateway
Pricing Namespace
Pr...
109
Canary Deploy
Gateway
/api/*
Products Namespace
Catalogue
Proxy
Purchase Namespace
Cart
Proxy
Payment
Gateway
Proxy
Pr...
110
Canary Deploy
Gateway
/api/*
Products Namespace
Catalogue
Proxy
Purchase Namespace
Cart
Proxy
Payment
Gateway
Proxy
Pr...
111
Canary Deploy
Gateway
/api/*
Products Namespace
Catalogue
Proxy
Purchase Namespace
Cart
Proxy
Payment
Gateway
Proxy
Pr...
112
Canary Deploy
Gateway
/api/*
Products Namespace
Catalogue
Proxy
Purchase Namespace
Cart
Proxy
Payment
Gateway
Proxy
Pr...
113
Canary Deploy
Gateway
/api/*
Products Namespace
Catalogue
Proxy
Purchase Namespace
Cart
Proxy
Payment
Gateway
Proxy
Pr...
114
115
Lo schema finale
116
117
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
Kubernetes Distro
Sidecars
118
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
Kubernetes Distro
Sidecars
Git
Pipelines
Docker
R...
119
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
Kubernetes Distro
Sidecars
Git
Pipelines
Docker
R...
120
Kubernetes
Namespace
Worker
Node
Worker
Node
Worker
Node
Pod
Service
Git
Pipelines
Docker
Registry
Metrics
Logs
APIs
K...
Da dove posso iniziare?
121
122
https://kubernetes.io/docs/home/
https://www.cncf.io/
https://landscape.cncf.io/
123
https://sessionize.com/giulio-roggero/
Próximos SlideShares
Carregando em…5
×

Kubernetes and CNCF Landscape 101

Una intro sui concetti base di k8s e come sono implementati dall'ecosistema della Cloud Native Computing Foundation

  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

Kubernetes and CNCF Landscape 101

  1. 1. Kubernetes and CNCF Landscape 101 Giulio Roggero Founder and CTO Mia-Platform
  2. 2. 2https://landscape.cncf.io/
  3. 3. 3https://landscape.cncf.io/
  4. 4. 4https://landscape.cncf.io/
  5. 5. 5https://landscape.cncf.io/
  6. 6. Process 6 Un sistema operativo gestisce processi, schedulandoli e fornendogli le risorse per funzionare in modo corretto
  7. 7. Process 7 Cosa ha bisogno di un processo per girare?
  8. 8. Process 8 CPU per far girare le logiche
  9. 9. Process 9 Memoria per gestire i dati in modo veloce
  10. 10. Process 10 Disco per salvare i dati in modo persistente
  11. 11. Process 11 Networking per poter comunicare con l’esterno
  12. 12. Process ProcessProcess 12 I processi sono più di uno alla vota, centinaia!
  13. 13. A B C Se avessi più macchine?
  14. 14. A B C Process ProcessProcess … e volessi distribuire i processi su più macchine
  15. 15. A B C Process ProcessProcess Ho bisogno di 2 repliche Ho bisogno di 4 repliche Ho bisogno di 3 repliche … e volessi replicarli?
  16. 16. A B C Process Orchestration Process Scheduling
  17. 17. A B C Process Orchestration 2 instances Process Scheduling
  18. 18. A B C Process Orchestration 2 instances Process Scheduling Go on A and B
  19. 19. ProcessProcess A B C Process Orchestration 2 instances Process Scheduling Go on A and B
  20. 20. Process Process ProcessProcess Process A B C Process Orchestration 2 instances 3 instances Process Scheduling Go on A and B Go on A and B
  21. 21. Process Process ProcessProcessProcess ProcessProcess ProcessProcess A B C Process Orchestration 2 instances 3 instances 4 instances Process Scheduling Go on A and B Go on A and B Go on A and C
  22. 22. Process Process ProcessProcessProcess ProcessProcess ProcessProcess A is broken! B C Process Orchestration 2 instances 3 instances 4 instances Process Scheduling Go on A and B Go on A and B Go on A and C
  23. 23. Process Process ProcessProcessProcess ProcessProcessProcess Process A is broken! B C Process Orchestration 2 instances 3 instances 4 instances Process Scheduling Go on B Go on B and C Go on B and C I processi sono rischedulati in automatico e in modo trasparente
  24. 24. 24
  25. 25. Come funziona nel dettaglio 25
  26. 26. 26 Per maggiori dettagli si rimanda alla documentazione ufficiale di Kubernetes https://kubernetes.io/docs/concepts/overview/components/
  27. 27. Un cluster k8s è 27
  28. 28. A B C
  29. 29. Virtualization A B C
  30. 30. Virtualization Master Master Worker Node Worker Node Worker Node Worker Node Worker Node Worker Node A B C
  31. 31. Kubernetes Virtualization Master Master Worker Node Worker Node Worker Node Worker Node Worker Node Worker Node A B C
  32. 32. Kubernetes Virtualization Master Master Worker Node Worker Node Worker Node Worker Node Worker Node Worker Node Namespaces A B C
  33. 33. Kubernetes Virtualization Master Master Worker Node Worker Node Worker Node Worker Node Worker Node Worker Node Namespaces Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod A B C
  34. 34. Kubernetes Virtualization Master Master Worker Node Worker Node Worker Node Worker Node Worker Node Worker Node Namespaces Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Pod Container Container Microservice Sidecar Container Runtime API A B C
  35. 35. 35 Distro, Hosting, Installer e PaaS di K8S https://landscape.cncf.io/
  36. 36. 36 Distro, Hosting, Installer e PaaS di K8S https://landscape.cncf.io/
  37. 37. Come configuro un pod su k8s? 37
  38. 38. 38 https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/ Kubernetes Namespace Worker Node Worker Node Worker Node
  39. 39. 39 https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/ Kubernetes Namespace Worker Node Worker Node Worker Node
  40. 40. 40 https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/ Kubernetes Namespace Worker Node Worker Node Worker Node
  41. 41. 41 https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/ Kubernetes Namespace Worker Node Worker Node Worker Node
  42. 42. 42 https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/ Kubernetes Namespace Worker Node Worker Node Worker Node Docker Registry redis
  43. 43. 43 https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/ Kubernetes Namespace Worker Node Worker Node Worker Node Docker Registry redis pull
  44. 44. 44 https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/ Kubernetes Namespace Worker Node Worker Node Worker Node Pod redis Docker Registry redis pull
  45. 45. 45 https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/ Kubernetes Namespace Worker Node Worker Node Worker Node Pod
  46. 46. 46 https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/ Kubernetes Namespace Pod redis Container redis Worker Node Worker Node Worker Node
  47. 47. 47 https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/ Kubernetes Namespace Worker Node Worker Node Worker Node Worker Node
  48. 48. 48 https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/ Kubernetes Namespace Worker Node Worker Node Worker Node Worker Node
  49. 49. 49 https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/ Kubernetes Namespace Worker Node Worker Node Worker Node Worker Node Deployment nginx-deployment
  50. 50. 50 https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/ Kubernetes Namespace Worker Node Worker Node Worker Node Worker Node Deployment nginx-deployment Pod Pod
  51. 51. 51 https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/ Kubernetes Namespace Worker Node Worker Node Worker Node Worker Node Deployment nginx-deployment Pod Pod
  52. 52. 52 https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/ Kubernetes Namespace Pod nginx-....-7o5ns Container Nginx Worker Node Worker Node Worker Node nginx-....-r18az Container Nginx Pod Deployment nginx-deployment Worker Node
  53. 53. 53Tutte le risorse: https://kubernetes.io/docs/reference/kubectl/overview/
  54. 54. 54Tutte le risorse: https://kubernetes.io/docs/reference/kubectl/overview/
  55. 55. 55
  56. 56. 56
  57. 57. Rilasciare su k8s 57
  58. 58. 58 Kubernetes Namespace Worker Node Worker Node Worker Node Git Repo Code
  59. 59. 59 Kubernetes Namespace Worker Node Worker Node Worker Node Git Repo Code Pipeline Docker Registry Image
  60. 60. 60 Kubernetes Namespace Worker Node Worker Node Worker Node Git Repo Code Pipeline Docker Registry Image yaml conf
  61. 61. 61 Kubernetes Namespace Worker Node Worker Node Worker Node Git Repo Code yaml conf Pipeline Docker Registry Image Pipeline apply -f .yaml
  62. 62. 62 Kubernetes Namespace Worker Node Worker Node Worker Node Git Repo Code Yaml conf Pipeline Docker Registry Image Pipeline apply -f .yaml pull
  63. 63. 63 Kubernetes Namespace Worker Node Worker Node Worker Node Git Repo Code Yaml conf Pipeline Docker Registry Image Pipeline apply -f .yaml Pod
  64. 64. 64
  65. 65. 65
  66. 66. Rotte di salute 66
  67. 67. 67 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service /-/ready È pronto per ricevere traffico? readinessProbe https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
  68. 68. 68 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service /-/ready La readiness dice ok! readinessProbe https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
  69. 69. 69 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service /-/ready Il service manda il traffico al Pod! readinessProbe https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
  70. 70. 70 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service /-/ready Se ci mette molto tempo è consigliabile aggiungere la startup Probe che aspetta anche minuti prima che si avvii il servizio e poi passa alla readiness https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ startupProbe
  71. 71. 71 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service /-/ready https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ /-/healthz È in salute? livenessProbe Quando è tutto funzionante è bene chiedersi se il servizio è sempre attivo e risponde nei tempi
  72. 72. 72 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service /-/ready https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ /-/healthz Al momento sì! La liveness probe funziona correttamente livenessProbe
  73. 73. 73 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service /-/ready https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ /-/healthz Se smette di rispondere va in KO livenessProbe
  74. 74. 74 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service /-/ready https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ /-/healthz k8s riavvia il Pod Restart! livenessProbe
  75. 75. 75 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service /-/ready https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ /-/healthz e il traffico non è più indirizzato Restart! livenessProbe
  76. 76. 76 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service /-/ready https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ /-/healthz Tutte le rotte non rispondono restarting... livenessProbe
  77. 77. 77 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service /-/ready https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ /-/healthz È pronto livenessProbe
  78. 78. 78 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service /-/ready https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ /-/healthz indirizza il traffico livenessProbe
  79. 79. 79 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service /-/ready https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ /-/healthz Tutto di nuovo funzionante livenessProbe
  80. 80. Metriche 80
  81. 81. 81 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ /-/metrics Possiamo esporre delle misure che vengono prese in pull da un servizio che le salva su DB e consente di graficare nel tempo le metriche. Es: ● Messaggi scodati ● Pagamenti effettuati ● Utenti attivi ● ecc...
  82. 82. 82 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ /-/metrics Possiamo esporre delle misure che vengono prese in pull da un servizio che le salva su DB e consente di graficare nel tempo le metriche. Es: ● Messaggi scodati ● Pagamenti effettuati ● Utenti attivi ● ecc... Metric Collector DB
  83. 83. 83 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ /-/metrics Possiamo esporre delle misure che vengono prese in pull da un servizio che le salva su DB e consente di graficare nel tempo le metriche. Es: ● Messaggi scodati ● Pagamenti effettuati ● Utenti attivi ● ecc... Metric Collector DB Dashboards
  84. 84. 84 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ /-/metrics Metric Collector DB Dashboards Posso costruire degli allarmi sulle metriche applicando anche tecniche di Machine Learning. Msg in queue > 1000
  85. 85. 85 Kubernetes Namespace Worker Node Worker Node Worker Node Service https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ /-/metrics Metric Collector DB Dashboards E posso decidere di far scalare i pod nel caso è necessario scodare di più Msg in queue > 1000 scale! Pod
  86. 86. 86 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ /-/metrics Metric Collector DB Dashboards Msg in queue > 1000 PodPod scale! E posso decidere di far scalare i pod nel caso è necessario scodare di più
  87. 87. 87 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ /-/metrics Metric Collector DB Dashboards Msg in queue > 1000 PodPod E l’allarme rientra
  88. 88. 88
  89. 89. 89
  90. 90. Logs 90
  91. 91. 91 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ I log vanno su stdout log stdout
  92. 92. 92 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ Logs collector DB Possono essere mandati ad un collettore che li salva ordinati su un db per fare analisi e allarmi. log stdout
  93. 93. 93 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ Logs collector DB Dashboards Possono essere aggregati in dashboard per capire il comportamento degli applicativi log stdout
  94. 94. 94 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ Logs collector DB Dashboards 499 response code E si possono definire allarmi sui log log stdout
  95. 95. 95
  96. 96. 96
  97. 97. Tracing 97
  98. 98. 98 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ Se voglio vedere tutte le chiamate interne ad un servizio utilizzo il tracing
  99. 99. 99 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ instrumentation Instrumento il codice con delle librerie
  100. 100. 100 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ Collector DBinstrumentation Dashboards E a questo punto posso raccogliere tutte le informazioni di tracing di tutte le chiamate tra servizi e tutti i metodi interni dei servizi.
  101. 101. 101
  102. 102. 102
  103. 103. Canary Release 103
  104. 104. 104 Canary Deploy Gateway /api/* Products Namespace Catalogue Purchase Namespace Cart Payment Gateway Pricing Namespace Pricing
  105. 105. 105 Canary Deploy Gateway /api/* Products Namespace Catalogue Purchase Namespace Cart Payment Gateway Pricing Namespace Pricing
  106. 106. 106 Canary Deploy Gateway /api/* Products Namespace Catalogue Purchase Namespace Cart Payment Gateway Pricing Namespace Pricing
  107. 107. 107 Canary Deploy Gateway /api/* Products Namespace Catalogue Purchase Namespace Cart Payment Gateway Pricing Namespace Pricing
  108. 108. 108 Canary Deploy Gateway /api/* Products Namespace Catalogue Purchase Namespace Cart Payment Gateway Pricing Namespace Pricing v1 Pricing v2Come farli convivere?
  109. 109. 109 Canary Deploy Gateway /api/* Products Namespace Catalogue Proxy Purchase Namespace Cart Proxy Payment Gateway Proxy Pricing Namespace Pricing v1 Proxy Pricing v2 Proxy
  110. 110. 110 Canary Deploy Gateway /api/* Products Namespace Catalogue Proxy Purchase Namespace Cart Proxy Payment Gateway Proxy Pricing Namespace Pricing v1 Proxy Pricing v2 Proxy
  111. 111. 111 Canary Deploy Gateway /api/* Products Namespace Catalogue Proxy Purchase Namespace Cart Proxy Payment Gateway Proxy Pricing Namespace Pricing v1 Proxy Pricing v2 Proxy90%
  112. 112. 112 Canary Deploy Gateway /api/* Products Namespace Catalogue Proxy Purchase Namespace Cart Proxy Payment Gateway Proxy Pricing Namespace Pricing v1 Proxy Pricing v2 Proxy 10% 90%
  113. 113. 113 Canary Deploy Gateway /api/* Products Namespace Catalogue Proxy Purchase Namespace Cart Proxy Payment Gateway Proxy Pricing Namespace Pricing v1 Proxy Pricing v2 Proxy User-agent iPhone User-agent Android
  114. 114. 114
  115. 115. 115
  116. 116. Lo schema finale 116
  117. 117. 117 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service Kubernetes Distro Sidecars
  118. 118. 118 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service Kubernetes Distro Sidecars Git Pipelines Docker Registry
  119. 119. 119 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service Kubernetes Distro Sidecars Git Pipelines Docker Registry Tracing Metrics Logs
  120. 120. 120 Kubernetes Namespace Worker Node Worker Node Worker Node Pod Service Git Pipelines Docker Registry Metrics Logs APIs Kubernetes Distro Sidecars Tracing
  121. 121. Da dove posso iniziare? 121
  122. 122. 122 https://kubernetes.io/docs/home/ https://www.cncf.io/ https://landscape.cncf.io/
  123. 123. 123 https://sessionize.com/giulio-roggero/

×