@xdev-asia/xdev-knowledge-mcp 1.0.43 → 1.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/content/pages/xoa-du-lieu-nguoi-dung.md +68 -0
  2. package/content/series/luyen-thi/luyen-thi-aws-ml-specialty/chapters/01-phan-1-data-engineering/lessons/01-bai-1-data-repositories-ingestion.md +5 -0
  3. package/content/series/luyen-thi/luyen-thi-aws-ml-specialty/chapters/01-phan-1-data-engineering/lessons/02-bai-2-data-transformation.md +5 -0
  4. package/content/series/luyen-thi/luyen-thi-aws-ml-specialty/chapters/01-phan-1-data-engineering/lessons/03-bai-3-data-analysis.md +159 -0
  5. package/content/series/luyen-thi/luyen-thi-aws-ml-specialty/chapters/02-phan-2-modeling/lessons/04-bai-4-sagemaker-built-in-algorithms.md +186 -0
  6. package/content/series/luyen-thi/luyen-thi-aws-ml-specialty/chapters/02-phan-2-modeling/lessons/05-bai-5-training-hyperparameter-tuning.md +159 -0
  7. package/content/series/luyen-thi/luyen-thi-aws-ml-specialty/chapters/02-phan-2-modeling/lessons/06-bai-6-model-evaluation.md +169 -0
  8. package/content/series/luyen-thi/luyen-thi-aws-ml-specialty/chapters/03-phan-3-implementation-operations/lessons/07-bai-7-model-deployment.md +193 -0
  9. package/content/series/luyen-thi/luyen-thi-aws-ml-specialty/chapters/03-phan-3-implementation-operations/lessons/08-bai-8-model-monitoring-mlops.md +184 -0
  10. package/content/series/luyen-thi/luyen-thi-aws-ml-specialty/chapters/03-phan-3-implementation-operations/lessons/09-bai-9-security-cost.md +166 -0
  11. package/content/series/luyen-thi/luyen-thi-aws-ml-specialty/chapters/04-phan-4-on-tap/lessons/10-bai-10-bai-toan-thuong-gap.md +181 -0
  12. package/content/series/luyen-thi/luyen-thi-aws-ml-specialty/chapters/04-phan-4-on-tap/lessons/11-bai-11-cheat-sheet.md +110 -0
  13. package/content/series/luyen-thi/luyen-thi-aws-ml-specialty/chapters/04-phan-4-on-tap/lessons/12-bai-12-chien-luoc-thi.md +113 -0
  14. package/content/series/luyen-thi/luyen-thi-aws-ml-specialty/index.md +1 -1
  15. package/content/series/luyen-thi/luyen-thi-cka/chapters/01-cluster-architecture/lessons/01-kien-truc-cka-kubeadm.md +133 -0
  16. package/content/series/luyen-thi/luyen-thi-cka/chapters/01-cluster-architecture/lessons/02-cluster-upgrade-kubeadm.md +147 -0
  17. package/content/series/luyen-thi/luyen-thi-cka/chapters/01-cluster-architecture/lessons/03-rbac-cka.md +152 -0
  18. package/content/series/luyen-thi/luyen-thi-cka/chapters/02-workloads-scheduling/lessons/04-deployments-daemonsets-statefulsets.md +186 -0
  19. package/content/series/luyen-thi/luyen-thi-cka/chapters/02-workloads-scheduling/lessons/05-scheduling-taints-affinity.md +163 -0
  20. package/content/series/luyen-thi/luyen-thi-cka/chapters/03-services-networking/lessons/06-services-endpoints-coredns.md +145 -0
  21. package/content/series/luyen-thi/luyen-thi-cka/chapters/03-services-networking/lessons/07-ingress-networkpolicies-cni.md +172 -0
  22. package/content/series/luyen-thi/luyen-thi-cka/chapters/04-storage/lessons/08-persistent-volumes-storageclass.md +159 -0
  23. package/content/series/luyen-thi/luyen-thi-cka/chapters/05-troubleshooting/lessons/09-etcd-backup-restore.md +149 -0
  24. package/content/series/luyen-thi/luyen-thi-cka/chapters/05-troubleshooting/lessons/10-troubleshooting-nodes.md +153 -0
  25. package/content/series/luyen-thi/luyen-thi-cka/chapters/05-troubleshooting/lessons/11-troubleshooting-workloads.md +146 -0
  26. package/content/series/luyen-thi/luyen-thi-cka/chapters/05-troubleshooting/lessons/12-troubleshooting-networking-exam.md +170 -0
  27. package/content/series/luyen-thi/luyen-thi-cka/index.md +217 -0
  28. package/content/series/luyen-thi/luyen-thi-ckad/chapters/01-app-design-build/lessons/01-multi-container-pods.md +146 -0
  29. package/content/series/luyen-thi/luyen-thi-ckad/chapters/01-app-design-build/lessons/02-jobs-cronjobs-resources.md +174 -0
  30. package/content/series/luyen-thi/luyen-thi-ckad/chapters/02-app-deployment/lessons/03-rolling-updates-rollbacks.md +148 -0
  31. package/content/series/luyen-thi/luyen-thi-ckad/chapters/02-app-deployment/lessons/04-helm-kustomize.md +181 -0
  32. package/content/series/luyen-thi/luyen-thi-ckad/chapters/03-app-observability/lessons/05-probes-logging-debugging.md +183 -0
  33. package/content/series/luyen-thi/luyen-thi-ckad/chapters/04-app-environment-config/lessons/06-configmaps-secrets.md +182 -0
  34. package/content/series/luyen-thi/luyen-thi-ckad/chapters/04-app-environment-config/lessons/07-securitycontext-pod-security.md +168 -0
  35. package/content/series/luyen-thi/luyen-thi-ckad/chapters/04-app-environment-config/lessons/08-resources-qos.md +168 -0
  36. package/content/series/luyen-thi/luyen-thi-ckad/chapters/05-services-networking/lessons/09-services-ingress.md +182 -0
  37. package/content/series/luyen-thi/luyen-thi-ckad/chapters/05-services-networking/lessons/10-networkpolicies-exam-strategy.md +236 -0
  38. package/content/series/luyen-thi/luyen-thi-ckad/index.md +199 -0
  39. package/content/series/luyen-thi/luyen-thi-gcp-ml-engineer/chapters/01-phan-1-problem-framing/lessons/01-bai-1-framing-ml-problems.md +136 -0
  40. package/content/series/luyen-thi/luyen-thi-gcp-ml-engineer/chapters/01-phan-1-problem-framing/lessons/02-bai-2-gcp-ai-ml-ecosystem.md +160 -0
  41. package/content/series/luyen-thi/luyen-thi-gcp-ml-engineer/chapters/02-phan-2-data-engineering/lessons/03-bai-3-data-pipeline.md +174 -0
  42. package/content/series/luyen-thi/luyen-thi-gcp-ml-engineer/chapters/02-phan-2-data-engineering/lessons/04-bai-4-feature-engineering.md +156 -0
  43. package/content/series/luyen-thi/luyen-thi-gcp-ml-engineer/chapters/03-phan-3-model-development/lessons/05-bai-5-vertex-ai-training.md +155 -0
  44. package/content/series/luyen-thi/luyen-thi-gcp-ml-engineer/chapters/03-phan-3-model-development/lessons/06-bai-6-bigquery-ml-tensorflow.md +141 -0
  45. package/content/series/luyen-thi/luyen-thi-gcp-ml-engineer/chapters/04-phan-4-deployment-mlops/lessons/07-bai-7-model-deployment.md +134 -0
  46. package/content/series/luyen-thi/luyen-thi-gcp-ml-engineer/chapters/04-phan-4-deployment-mlops/lessons/08-bai-8-vertex-ai-pipelines-mlops.md +149 -0
  47. package/content/series/luyen-thi/luyen-thi-gcp-ml-engineer/chapters/05-phan-5-responsible-ai/lessons/09-bai-9-responsible-ai.md +128 -0
  48. package/content/series/luyen-thi/luyen-thi-gcp-ml-engineer/chapters/05-phan-5-responsible-ai/lessons/10-bai-10-cheat-sheet-chien-luoc-thi.md +108 -0
  49. package/content/series/luyen-thi/luyen-thi-gcp-ml-engineer/index.md +1 -1
  50. package/content/series/luyen-thi/luyen-thi-kcna/chapters/01-kubernetes-fundamentals/lessons/01-kien-truc-kubernetes.md +137 -0
  51. package/content/series/luyen-thi/luyen-thi-kcna/chapters/01-kubernetes-fundamentals/lessons/02-pods-workloads-controllers.md +142 -0
  52. package/content/series/luyen-thi/luyen-thi-kcna/chapters/01-kubernetes-fundamentals/lessons/03-services-networking-storage.md +155 -0
  53. package/content/series/luyen-thi/luyen-thi-kcna/chapters/01-kubernetes-fundamentals/lessons/04-rbac-security.md +137 -0
  54. package/content/series/luyen-thi/luyen-thi-kcna/chapters/02-container-orchestration/lessons/05-container-runtimes-oci.md +137 -0
  55. package/content/series/luyen-thi/luyen-thi-kcna/chapters/02-container-orchestration/lessons/06-orchestration-patterns.md +147 -0
  56. package/content/series/luyen-thi/luyen-thi-kcna/chapters/03-cloud-native-architecture/lessons/07-cloud-native-architecture.md +143 -0
  57. package/content/series/luyen-thi/luyen-thi-kcna/chapters/04-observability-delivery/lessons/08-observability.md +143 -0
  58. package/content/series/luyen-thi/luyen-thi-kcna/chapters/04-observability-delivery/lessons/09-helm-gitops-cicd.md +162 -0
  59. package/content/series/luyen-thi/luyen-thi-kcna/index.md +168 -0
  60. package/data/quizzes.json +1059 -0
  61. package/package.json +1 -1
@@ -0,0 +1,143 @@
1
+ ---
2
+ id: kcna-d3-l07
3
+ title: 'Bài 7: Cloud Native Architecture & Design Patterns'
4
+ slug: 07-cloud-native-architecture
5
+ description: >-
6
+ Cloud native principles, microservices vs monolith, service mesh, 12-factor
7
+ app, immutable infrastructure và cloud native design patterns.
8
+ duration_minutes: 55
9
+ is_free: true
10
+ video_url: null
11
+ sort_order: 7
12
+ section_title: "Domain 3: Cloud Native Architecture (16%)"
13
+ course:
14
+ id: lt-kcna-series-001
15
+ title: 'Luyện thi KCNA — Kubernetes and Cloud Native Associate'
16
+ slug: luyen-thi-kcna
17
+ ---
18
+
19
+ <img src="/storage/uploads/2026/04/k8s-cert-kcna-bai7-cloud-native.png" alt="Cloud Native Architecture — Microservices vs Monolith, 12-Factor App" style="max-width: 800px; width: 100%; border-radius: 12px;" />
20
+
21
+ <h2 id="cloud-native">1. Cloud Native — Định nghĩa CNCF</h2>
22
+
23
+ <p>Theo <strong>CNCF (Cloud Native Computing Foundation)</strong>, cloud native là cách build và run scalable applications trong dynamic environments như public, private, hybrid cloud, sử dụng: <strong>containers, microservices, declarative APIs, immutable infrastructure</strong>.</p>
24
+
25
+ <table>
26
+ <thead><tr><th>Principle</th><th>Ý nghĩa</th><th>Ví dụ</th></tr></thead>
27
+ <tbody>
28
+ <tr><td><strong>Containerized</strong></td><td>Đóng gói app + dependencies</td><td>Docker image</td></tr>
29
+ <tr><td><strong>Dynamically orchestrated</strong></td><td>Automated scheduling, scaling, healing</td><td>Kubernetes</td></tr>
30
+ <tr><td><strong>Microservices</strong></td><td>Loose coupling, single responsibility</td><td>Auth service, Payment service</td></tr>
31
+ <tr><td><strong>Declarative APIs</strong></td><td>Describe desired state, not steps</td><td>kubectl apply -f deployment.yaml</td></tr>
32
+ <tr><td><strong>Immutable infrastructure</strong></td><td>Never modify running; replace instead</td><td>New image version → rolling update</td></tr>
33
+ </tbody>
34
+ </table>
35
+
36
+ <h2 id="microservices-vs-monolith">2. Microservices vs Monolith</h2>
37
+
38
+ <pre><code class="language-text">MONOLITH MICROSERVICES
39
+ ───────────────────── ──────────────────────────────
40
+ ┌──────────────────┐ ┌────────┐ ┌────────┐ ┌─────┐
41
+ │ Auth │ UI │ │ Auth │ │ Cart │ │ UI │
42
+ │ Cart │ API │ │Service │ │Service │ │Svc │
43
+ │ Payment │ DB │ └────────┘ └────────┘ └─────┘
44
+ └──────────────────┘ │ │ │
45
+ Deploy as 1 unit └─── API Gateway ───┘
46
+
47
+ Client/Browser</code></pre>
48
+
49
+ <table>
50
+ <thead><tr><th>Aspect</th><th>Monolith</th><th>Microservices</th></tr></thead>
51
+ <tbody>
52
+ <tr><td>Deployment</td><td>All-or-nothing</td><td>Independent per service</td></tr>
53
+ <tr><td>Scaling</td><td>Scale entire app</td><td>Scale only bottleneck service</td></tr>
54
+ <tr><td>Complexity</td><td>Low (single codebase)</td><td>High (distributed)</td></tr>
55
+ <tr><td>Fault isolation</td><td>One bug crashes all</td><td>Failure contained in service</td></tr>
56
+ <tr><td>Technology</td><td>Single stack</td><td>Polyglot (best tool per service)</td></tr>
57
+ </tbody>
58
+ </table>
59
+
60
+ <h2 id="12-factor">3. 12-Factor App</h2>
61
+
62
+ <p>The <strong>12-factor app</strong> methodology định nghĩa best practices cho cloud native applications:</p>
63
+
64
+ <table>
65
+ <thead><tr><th>#</th><th>Factor</th><th>Cloud Native Practice</th></tr></thead>
66
+ <tbody>
67
+ <tr><td>1</td><td><strong>Codebase</strong></td><td>1 repo per app, many deploys</td></tr>
68
+ <tr><td>2</td><td><strong>Dependencies</strong></td><td>Declare explicitly (package.json, go.mod)</td></tr>
69
+ <tr><td>3</td><td><strong>Config</strong></td><td>Store in environment (ConfigMap, Secrets)</td></tr>
70
+ <tr><td>4</td><td><strong>Backing services</strong></td><td>DB, cache = attached resources via URL</td></tr>
71
+ <tr><td>5</td><td><strong>Build/Release/Run</strong></td><td>Strict separation (CI builds, CD deploys)</td></tr>
72
+ <tr><td>6</td><td><strong>Processes</strong></td><td>Stateless processes, store state externally</td></tr>
73
+ <tr><td>7</td><td><strong>Port binding</strong></td><td>Export service via port (no web server layer)</td></tr>
74
+ <tr><td>8</td><td><strong>Concurrency</strong></td><td>Scale via process model (HPA)</td></tr>
75
+ <tr><td>9</td><td><strong>Disposability</strong></td><td>Fast startup, graceful shutdown</td></tr>
76
+ <tr><td>10</td><td><strong>Dev/Prod parity</strong></td><td>Same tools/services across environments</td></tr>
77
+ <tr><td>11</td><td><strong>Logs</strong></td><td>Treat as event streams (stdout, not files)</td></tr>
78
+ <tr><td>12</td><td><strong>Admin processes</strong></td><td>Run one-off admin tasks as Jobs</td></tr>
79
+ </tbody>
80
+ </table>
81
+
82
+ <blockquote><p><strong>Exam tip:</strong> Factors 3, 6, 9, 11 hay xuất hiện trong câu hỏi KCNA. Factor 3 (config in env) → ConfigMap/Secret. Factor 6 (stateless) → lý do dùng external storage. Factor 11 (logs as streams) → stdout → log aggregator.</p></blockquote>
83
+
84
+ <h2 id="service-mesh">4. Service Mesh</h2>
85
+
86
+ <p>Khi microservices nhiều lên, cần quản lý: mTLS, retry, circuit breaker, observability. <strong>Service Mesh</strong> giải quyết điều này bằng cách inject <strong>sidecar proxy</strong> vào mỗi Pod.</p>
87
+
88
+ <pre><code class="language-text">Without Service Mesh: With Service Mesh (Istio):
89
+ App A ──────────────► App B App A ──► [Envoy] ──► [Envoy] ──► App B
90
+ (manual TLS, retry code) sidecar sidecar
91
+ (auto mTLS, metrics, retry, tracing)</code></pre>
92
+
93
+ <table>
94
+ <thead><tr><th>Tính năng</th><th>Service Mesh cung cấp</th></tr></thead>
95
+ <tbody>
96
+ <tr><td>mTLS mutual authentication</td><td>Auto-encrypt traffic giữa services</td></tr>
97
+ <tr><td>Traffic management</td><td>Canary, A/B, weighted routing</td></tr>
98
+ <tr><td>Observability</td><td>Auto metrics, tracing, access logs</td></tr>
99
+ <tr><td>Resilience</td><td>Retry, timeout, circuit breaker</td></tr>
100
+ </tbody>
101
+ </table>
102
+
103
+ <h2 id="cheatsheet">5. Cheat Sheet</h2>
104
+
105
+ <table>
106
+ <thead><tr><th>Câu hỏi exam</th><th>Đáp án</th></tr></thead>
107
+ <tbody>
108
+ <tr><td>CNCF định nghĩa cloud native bao gồm?</td><td>Containers, microservices, declarative APIs, immutable infra</td></tr>
109
+ <tr><td>Config nên lưu ở đâu theo 12-factor?</td><td>Environment variables (không hardcode)</td></tr>
110
+ <tr><td>Logs theo 12-factor?</td><td>Treat as streams (stdout/stderr)</td></tr>
111
+ <tr><td>Service mesh inject gì vào Pod?</td><td><strong>Sidecar proxy</strong> (Envoy)</td></tr>
112
+ <tr><td>Microservices scale phần nào?</td><td>Chỉ service có bottleneck</td></tr>
113
+ </tbody>
114
+ </table>
115
+
116
+ <h2 id="practice">6. Practice Questions</h2>
117
+
118
+ <p><strong>Q1:</strong> According to the 12-factor app methodology, how should an application store its database connection string?</p>
119
+ <ul>
120
+ <li>A) Hardcoded in the source code</li>
121
+ <li>B) In a configuration file committed to the repository</li>
122
+ <li>C) As an environment variable (Kubernetes ConfigMap or Secret) ✓</li>
123
+ <li>D) In the container image as a build argument</li>
124
+ </ul>
125
+ <p><em>Explanation: Factor 3 (Config) states: "Store config in the environment." In Kubernetes, this means using ConfigMaps for non-sensitive config and Secrets for sensitive values, injected as environment variables.</em></p>
126
+
127
+ <p><strong>Q2:</strong> What is the primary benefit of using a Service Mesh in a microservices architecture?</p>
128
+ <ul>
129
+ <li>A) Replace Kubernetes for container orchestration</li>
130
+ <li>B) Provide infrastructure-level networking features (mTLS, retry, observability) without changing application code ✓</li>
131
+ <li>C) Store application configuration</li>
132
+ <li>D) Persist application state across container restarts</li>
133
+ </ul>
134
+ <p><em>Explanation: Service mesh moves cross-cutting concerns (security, observability, resilience) to the infrastructure layer via sidecar proxies. Developers don't need to implement retry logic or mTLS in each service.</em></p>
135
+
136
+ <p><strong>Q3:</strong> Which characteristic distinguishes "immutable infrastructure" from traditional infrastructure?</p>
137
+ <ul>
138
+ <li>A) Servers are never rebooted</li>
139
+ <li>B) Running systems are replaced rather than modified in-place ✓</li>
140
+ <li>C) Configuration changes require manual approval</li>
141
+ <li>D) Infrastructure is defined using only YAML files</li>
142
+ </ul>
143
+ <p><em>Explanation: Immutable infrastructure means you never update/patch a running container — you build a new image, deploy it, replace old containers. This eliminates configuration drift and improves repeatability.</em></p>
@@ -0,0 +1,143 @@
1
+ ---
2
+ id: kcna-d4-l08
3
+ title: 'Bài 8: Cloud Native Observability'
4
+ slug: 08-observability
5
+ description: >-
6
+ Ba trụ cột của Observability: Metrics, Logs, Traces. Prometheus, Grafana,
7
+ OpenTelemetry, Jaeger, Loki và observability trong Kubernetes.
8
+ duration_minutes: 55
9
+ is_free: true
10
+ video_url: null
11
+ sort_order: 8
12
+ section_title: "Domain 4: Cloud Native Observability & Security (16%)"
13
+ course:
14
+ id: lt-kcna-series-001
15
+ title: 'Luyện thi KCNA — Kubernetes and Cloud Native Associate'
16
+ slug: luyen-thi-kcna
17
+ ---
18
+
19
+ <img src="/storage/uploads/2026/04/k8s-cert-kcna-bai8-observability.png" alt="Three Pillars of Observability — Metrics, Logs, Traces" style="max-width: 800px; width: 100%; border-radius: 12px;" />
20
+
21
+ <h2 id="three-pillars">1. Ba Trụ Cột của Observability</h2>
22
+
23
+ <p>Observability là khả năng hiểu trạng thái nội tại của một hệ thống qua các signals từ bên ngoài. Gồm 3 trụ cột:</p>
24
+
25
+ <table>
26
+ <thead><tr><th>Pillar</th><th>Là gì</th><th>Trả lời câu hỏi</th><th>Tool</th></tr></thead>
27
+ <tbody>
28
+ <tr><td><strong>Metrics</strong></td><td>Số liệu tổng hợp theo thời gian</td><td>"Hệ thống đang ở trạng thái nào?"</td><td>Prometheus + Grafana</td></tr>
29
+ <tr><td><strong>Logs</strong></td><td>Dòng text event từ từng service</td><td>"Điều gì đã xảy ra?"</td><td>Loki, Elasticsearch, Fluentd</td></tr>
30
+ <tr><td><strong>Traces</strong></td><td>Luồng request qua nhiều services</td><td>"Request đi qua đâu và mất bao lâu?"</td><td>Jaeger, Zipkin, Tempo</td></tr>
31
+ </tbody>
32
+ </table>
33
+
34
+ <pre><code class="language-text">User request fails → Use 3 pillars:
35
+
36
+ METRICS: CPU spike at 14:05?
37
+ LOGS: Error "DB timeout" in service B
38
+ TRACES: Request A→B→C, step B took 8s
39
+
40
+ → Root cause: Service B DB connection pool exhausted</code></pre>
41
+
42
+ <blockquote><p><strong>Exam tip:</strong> KCNA thường hỏi "welche tool" cho từng pillar. Prometheus = metrics. Grafana = visualization. Jaeger = distributed tracing. Loki = log aggregation.</p></blockquote>
43
+
44
+ <h2 id="prometheus">2. Prometheus & Metrics</h2>
45
+
46
+ <p><strong>Prometheus</strong> là CNCF graduated project cho monitoring và alerting. Pull-based: Prometheus scrapes metrics từ targets.</p>
47
+
48
+ <pre><code class="language-text">Prometheus Architecture:
49
+ App (exposes /metrics)
50
+ ↑ scrape
51
+ Prometheus Server ──► Alert Manager ──► Slack/PagerDuty
52
+
53
+ Grafana (query PromQL → charts)</code></pre>
54
+
55
+ <table>
56
+ <thead><tr><th>Metric Type</th><th>Ý nghĩa</th><th>Ví dụ</th></tr></thead>
57
+ <tbody>
58
+ <tr><td><strong>Counter</strong></td><td>Chỉ tăng (reset khi restart)</td><td>http_requests_total</td></tr>
59
+ <tr><td><strong>Gauge</strong></td><td>Tăng/giảm tự do</td><td>memory_usage_bytes</td></tr>
60
+ <tr><td><strong>Histogram</strong></td><td>Distribution, quantile</td><td>request_duration_seconds</td></tr>
61
+ <tr><td><strong>Summary</strong></td><td>Pre-computed quantiles</td><td>response_size_summary</td></tr>
62
+ </tbody>
63
+ </table>
64
+
65
+ <h2 id="opentelemetry">3. OpenTelemetry (OTel)</h2>
66
+
67
+ <p><strong>OpenTelemetry</strong> là CNCF standard cho thu thập telemetry (metrics, logs, traces) với vendor-neutral SDK và Collector.</p>
68
+
69
+ <pre><code class="language-text">OpenTelemetry Flow:
70
+ App (instrumented with OTel SDK)
71
+ │ OTLP (protocol)
72
+ OTel Collector (receive, process, export)
73
+
74
+ ┌────┴────┐
75
+ Jaeger Prometheus Loki
76
+ (traces) (metrics) (logs)</code></pre>
77
+
78
+ <blockquote><p><strong>Exam tip:</strong> OpenTelemetry tách vendor-specific code ra khỏi apps — chỉ cần thay đổi OTel Collector config để switch từ Jaeger sang Zipkin mà không cần sửa app code.</p></blockquote>
79
+
80
+ <h2 id="k8s-observability">4. Observability trong Kubernetes</h2>
81
+
82
+ <table>
83
+ <thead><tr><th>Component</th><th>Cung cấp</th></tr></thead>
84
+ <tbody>
85
+ <tr><td><strong>kubelet /metrics</strong></td><td>Node resource metrics cho Prometheus</td></tr>
86
+ <tr><td><strong>metrics-server</strong></td><td>CPU/Memory cho kubectl top, HPA</td></tr>
87
+ <tr><td><strong>kube-state-metrics</strong></td><td>Kubernetes object state (Pod, Deployment status)</td></tr>
88
+ <tr><td><strong>Prometheus Operator</strong></td><td>Deploy Prometheus stack với CRDs (ServiceMonitor)</td></tr>
89
+ <tr><td><strong>Loki + Promtail</strong></td><td>Log aggregation (Promtail thu thập logs từ nodes)</td></tr>
90
+ </tbody>
91
+ </table>
92
+
93
+ <h3 id="kubectl-debug">kubectl debugging commands</h3>
94
+
95
+ <pre><code class="language-text">kubectl logs pod-name # Current container logs
96
+ kubectl logs pod-name --previous # Last crashed container logs
97
+ kubectl logs -f pod-name # Stream live logs
98
+ kubectl describe pod pod-name # Events + status details
99
+ kubectl top pod # CPU/Memory (needs metrics-server)
100
+ kubectl top node # Node resource usage</code></pre>
101
+
102
+ <h2 id="cheatsheet">5. Cheat Sheet</h2>
103
+
104
+ <table>
105
+ <thead><tr><th>Câu hỏi exam</th><th>Đáp án</th></tr></thead>
106
+ <tbody>
107
+ <tr><td>3 pillars of observability?</td><td><strong>Metrics, Logs, Traces</strong></td></tr>
108
+ <tr><td>Distributed tracing tool?</td><td><strong>Jaeger</strong>, Zipkin, Tempo</td></tr>
109
+ <tr><td>Kubernetes metrics collection?</td><td><strong>Prometheus</strong></td></tr>
110
+ <tr><td>Visualization dashboard?</td><td><strong>Grafana</strong></td></tr>
111
+ <tr><td>Vendor-neutral telemetry standard?</td><td><strong>OpenTelemetry</strong></td></tr>
112
+ <tr><td>kubectl top cần gì?</td><td><strong>metrics-server</strong></td></tr>
113
+ </tbody>
114
+ </table>
115
+
116
+ <h2 id="practice">6. Practice Questions</h2>
117
+
118
+ <p><strong>Q1:</strong> A team needs to trace how a single HTTP request flows through 5 microservices to find which service adds the most latency. Which observability tool should they use?</p>
119
+ <ul>
120
+ <li>A) Prometheus</li>
121
+ <li>B) Grafana</li>
122
+ <li>C) Jaeger ✓</li>
123
+ <li>D) Loki</li>
124
+ </ul>
125
+ <p><em>Explanation: Distributed tracing (Jaeger, Zipkin) tracks a request's entire flow across multiple services, showing each hop's latency and relationships. Prometheus shows aggregate metrics; Loki shows logs; Grafana is visualization.</em></p>
126
+
127
+ <p><strong>Q2:</strong> What type of Prometheus metric would you use to track the total number of HTTP requests served since startup?</p>
128
+ <ul>
129
+ <li>A) Gauge</li>
130
+ <li>B) Histogram</li>
131
+ <li>C) Counter ✓</li>
132
+ <li>D) Summary</li>
133
+ </ul>
134
+ <p><em>Explanation: Counter is a monotonically increasing metric — it only goes up (or resets to 0 on restart). Perfect for tracking cumulative events like requests, errors, or bytes transferred. Gauge is for values that go up and down (like memory usage).</em></p>
135
+
136
+ <p><strong>Q3:</strong> Which framework allows developers to instrument their application once and export telemetry to multiple backends (Jaeger, Prometheus, etc.) without code changes?</p>
137
+ <ul>
138
+ <li>A) Prometheus client libraries</li>
139
+ <li>B) OpenTelemetry ✓</li>
140
+ <li>C) Kubernetes metrics-server</li>
141
+ <li>D) Grafana Agent</li>
142
+ </ul>
143
+ <p><em>Explanation: OpenTelemetry provides vendor-neutral APIs and SDKs for generating traces, metrics, and logs. The OTel Collector routes telemetry to different backends. Switching backends requires only Collector config changes, not application code.</em></p>
@@ -0,0 +1,162 @@
1
+ ---
2
+ id: kcna-d4-l09
3
+ title: 'Bài 9: Helm, GitOps & CI/CD'
4
+ slug: 09-helm-gitops-cicd
5
+ description: >-
6
+ Helm package manager, GitOps với Argo CD, CI/CD pipelines cho Kubernetes.
7
+ Deployment strategies: rolling update, canary, blue-green.
8
+ duration_minutes: 60
9
+ is_free: true
10
+ video_url: null
11
+ sort_order: 9
12
+ section_title: "Domain 4: Cloud Native Observability & Security (16%)"
13
+ course:
14
+ id: lt-kcna-series-001
15
+ title: 'Luyện thi KCNA — Kubernetes and Cloud Native Associate'
16
+ slug: luyen-thi-kcna
17
+ ---
18
+
19
+ <img src="/storage/uploads/2026/04/k8s-cert-kcna-bai9-helm-gitops.png" alt="GitOps Workflow với Helm và Argo CD" style="max-width: 800px; width: 100%; border-radius: 12px;" />
20
+
21
+ <h2 id="helm">1. Helm — Kubernetes Package Manager</h2>
22
+
23
+ <p><strong>Helm</strong> là package manager cho Kubernetes. Charts là template YAML có thể reuse và parameterize.</p>
24
+
25
+ <pre><code class="language-text">Helm Concepts:
26
+ Chart = Package (templates + default values)
27
+ Release = Installed instance of a chart in a cluster
28
+ Repository = Collection of charts (ArtifactHub.io)
29
+ Values = Parameters to customize a chart
30
+
31
+ $ helm install my-nginx bitnami/nginx --set service.type=LoadBalancer
32
+ └── Release: my-nginx
33
+ ├── templates/deployment.yaml
34
+ ├── templates/service.yaml
35
+ └── values.yaml (overridden)</code></pre>
36
+
37
+ <table>
38
+ <thead><tr><th>Helm Command</th><th>Chức năng</th></tr></thead>
39
+ <tbody>
40
+ <tr><td><code>helm install</code></td><td>Deploy chart mới (tạo release)</td></tr>
41
+ <tr><td><code>helm upgrade</code></td><td>Update release với chart mới/values mới</td></tr>
42
+ <tr><td><code>helm rollback</code></td><td>Khôi phục về revision trước</td></tr>
43
+ <tr><td><code>helm list</code></td><td>Liệt kê tất cả releases</td></tr>
44
+ <tr><td><code>helm uninstall</code></td><td>Xóa release</td></tr>
45
+ <tr><td><code>helm template</code></td><td>Render templates mà không deploy</td></tr>
46
+ </tbody>
47
+ </table>
48
+
49
+ <blockquote><p><strong>Exam tip:</strong> Helm lưu release history trong Kubernetes Secrets (không phải ConfigMap). Điều này cho phép <code>helm rollback</code> hoạt động. History mặc định giữ 10 revisions.</p></blockquote>
50
+
51
+ <h2 id="gitops">2. GitOps</h2>
52
+
53
+ <p><strong>GitOps</strong> là operational framework dùng Git làm <strong>single source of truth</strong> cho cả code lẫn infrastructure config.</p>
54
+
55
+ <pre><code class="language-text">GitOps Flow:
56
+ Developer ──push──► Git Repo (desired state)
57
+
58
+ GitOps Operator (Argo CD / Flux)
59
+ - Watches Git repo
60
+ - Compares with cluster state
61
+ - Syncs if diff found
62
+
63
+ K8s Cluster (actual state)</code></pre>
64
+
65
+ <table>
66
+ <thead><tr><th>GitOps Principle</th><th>Ý nghĩa</th></tr></thead>
67
+ <tbody>
68
+ <tr><td><strong>Declarative</strong></td><td>System state mô tả bằng YAML trong Git</td></tr>
69
+ <tr><td><strong>Versioned & immutable</strong></td><td>Git history = audit trail</td></tr>
70
+ <tr><td><strong>Pulled automatically</strong></td><td>Agent pull changes, không cần push access vào cluster</td></tr>
71
+ <tr><td><strong>Continuously reconciled</strong></td><td>Drift detection — auto-correct nếu cluster khác Git</td></tr>
72
+ </tbody>
73
+ </table>
74
+
75
+ <h3 id="argo-cd">Argo CD</h3>
76
+
77
+ <p><strong>Argo CD</strong> là GitOps controller phổ biến nhất cho Kubernetes (CNCF Incubating → Graduated 2022).</p>
78
+
79
+ <blockquote><p><strong>Exam tip:</strong> GitOps dùng <strong>pull-based</strong> deployment thay vì push. Lợi ích: cluster không cần expose API ra bên ngoài, CI pipeline không cần kubeconfig credentials.</p></blockquote>
80
+
81
+ <h2 id="cicd">3. CI/CD cho Kubernetes</h2>
82
+
83
+ <pre><code class="language-text">CI/CD Pipeline:
84
+ Code Push
85
+
86
+ ┌───▼───┐ CI Phase (Build)
87
+ │ Build │── Unit tests ── Integration tests
88
+ │ Image │── Security scan (Trivy, Snyk)
89
+ └───┬───┘── Push to Registry (ECR, GCR)
90
+
91
+ ┌───▼───┐ CD Phase (Deploy)
92
+ │ Update │── Update Helm values / K8s manifest
93
+ │ Manifest│── Push to GitOps repo
94
+ └───┬───┘── Argo CD picks up and syncs
95
+
96
+ ┌───▼────────────────────┐
97
+ │ Kubernetes Cluster │
98
+ │ Rolling Update │
99
+ └────────────────────────┘</code></pre>
100
+
101
+ <h2 id="deployment-strategies">4. Deployment Strategies</h2>
102
+
103
+ <table>
104
+ <thead><tr><th>Strategy</th><th>Cách hoạt động</th><th>Downtime</th><th>Rollback</th><th>Dùng khi</th></tr></thead>
105
+ <tbody>
106
+ <tr><td><strong>Rolling Update</strong></td><td>Replace pods gradually (default)</td><td>Không</td><td>kubectl rollout undo</td><td>Stateless apps, gradual</td></tr>
107
+ <tr><td><strong>Recreate</strong></td><td>Kill all v1, then deploy v2</td><td>Có</td><td>Redeploy v1</td><td>Breaking changes, simple</td></tr>
108
+ <tr><td><strong>Blue-Green</strong></td><td>Run v1 (blue) + v2 (green) side by side, switch traffic</td><td>Không</td><td>Switch back instantly</td><td>Kritisch apps, fast rollback</td></tr>
109
+ <tr><td><strong>Canary</strong></td><td>Route small % traffic to new version</td><td>Không</td><td>Redirect traffic</td><td>Staged rollout, A/B testing</td></tr>
110
+ </tbody>
111
+ </table>
112
+
113
+ <pre><code class="language-text">Canary in Kubernetes (Ingress weight):
114
+ ┌─────────────────────────────────┐
115
+ │ Ingress (canary annotation) │
116
+ │ 90% ──────► Deployment v1.0 │
117
+ │ 10% ──────► Deployment v1.1 │
118
+ └─────────────────────────────────┘
119
+ → Monitor v1.1 errors → promote to 100% or rollback</code></pre>
120
+
121
+ <h2 id="cheatsheet">5. Cheat Sheet</h2>
122
+
123
+ <table>
124
+ <thead><tr><th>Câu hỏi exam</th><th>Đáp án</th></tr></thead>
125
+ <tbody>
126
+ <tr><td>Helm lưu release history ở đâu?</td><td><strong>Kubernetes Secrets</strong></td></tr>
127
+ <tr><td>GitOps single source of truth?</td><td><strong>Git repository</strong></td></tr>
128
+ <tr><td>GitOps dùng pull hay push?</td><td><strong>Pull-based</strong> (agent pulls)</td></tr>
129
+ <tr><td>Deployment không có downtime?</td><td><strong>Rolling</strong> hoặc <strong>Blue-Green</strong></td></tr>
130
+ <tr><td>Test new version với 5% traffic?</td><td><strong>Canary</strong> deployment</td></tr>
131
+ <tr><td>Fast rollback khi có issue?</td><td><strong>Blue-Green</strong> (instant switch)</td></tr>
132
+ </tbody>
133
+ </table>
134
+
135
+ <h2 id="practice">6. Practice Questions</h2>
136
+
137
+ <p><strong>Q1:</strong> A team wants to deploy a new version of their app to 10% of users first, monitor for errors, then gradually increase traffic. Which deployment strategy should they use?</p>
138
+ <ul>
139
+ <li>A) Recreate</li>
140
+ <li>B) Rolling Update</li>
141
+ <li>C) Blue-Green</li>
142
+ <li>D) Canary ✓</li>
143
+ </ul>
144
+ <p><em>Explanation: Canary deployment routes a small percentage of traffic to the new version, allowing teams to validate it with real traffic before full rollout. This minimizes blast radius if the new version has bugs.</em></p>
145
+
146
+ <p><strong>Q2:</strong> Which of the following best describes the GitOps model?</p>
147
+ <ul>
148
+ <li>A) CI/CD pipeline pushes directly to Kubernetes after tests pass</li>
149
+ <li>B) Git repository is the single source of truth; a controller continuously reconciles cluster state with Git ✓</li>
150
+ <li>C) Developers manually apply kubectl commands from their workstations</li>
151
+ <li>D) Infrastructure is defined in a relational database for consistency</li>
152
+ </ul>
153
+ <p><em>Explanation: GitOps uses a pull-based model where a controller (Argo CD, Flux) watches a Git repository and ensures the cluster matches what's declared in Git. This provides audit trail, drift detection, and secure deployments.</em></p>
154
+
155
+ <p><strong>Q3:</strong> Where does Helm store release history to enable rollback capability?</p>
156
+ <ul>
157
+ <li>A) Helm's local filesystem (~/.helm)</li>
158
+ <li>B) ConfigMap in the target namespace</li>
159
+ <li>C) Secret in the target namespace ✓</li>
160
+ <li>D) A separate etcd database</li>
161
+ </ul>
162
+ <p><em>Explanation: Since Helm v3, release metadata (history, values, chart info) is stored as Secrets in the release's namespace. This enables helm rollback by reading previous revision data, and allows multiple users/systems to manage the same release.</em></p>
@@ -0,0 +1,168 @@
1
+ ---
2
+ id: lt-kcna-series-001
3
+ title: "Luyện thi KCNA — Kubernetes and Cloud Native Associate"
4
+ slug: luyen-thi-kcna
5
+ description: >-
6
+ Lộ trình ôn tập toàn diện cho kỳ thi KCNA (Kubernetes and Cloud Native Associate).
7
+ Bao phủ đầy đủ 5 domain: Kubernetes Fundamentals (46%), Container Orchestration (22%),
8
+ Cloud Native Architecture (16%), Observability (8%), Application Delivery (8%).
9
+ 9 bài học chuyên sâu kèm bài tập trắc nghiệm tiếng Anh.
10
+
11
+ featured_image: images/blog/luyen-thi-kcna-banner.png
12
+ level: beginner
13
+ duration_hours: 20
14
+ lesson_count: 9
15
+ price: '0.00'
16
+ is_free: true
17
+ view_count: 0
18
+ average_rating: '0.00'
19
+ review_count: 0
20
+ enrollment_count: 0
21
+ meta: null
22
+ published_at: '2026-04-05T10:00:00.000000Z'
23
+ created_at: '2026-04-05T10:00:00.000000Z'
24
+
25
+ author:
26
+ id: 019c9616-d2b4-713f-9b2c-40e2e92a05cf
27
+ name: Duy Tran
28
+ avatar: avatars/7e8eb5c6-4cac-455b-a701-4060f085d501.jpeg
29
+
30
+ category:
31
+ id: 019c9616-cat9-7009-a009-000000000009
32
+ name: Luyện thi chứng chỉ
33
+ slug: luyen-thi
34
+
35
+ tags:
36
+
37
+ - name: Kubernetes
38
+ slug: kubernetes
39
+ - name: CNCF
40
+ slug: cncf
41
+ - name: Cloud Native
42
+ slug: cloud-native
43
+ - name: Chứng chỉ
44
+ slug: chung-chi
45
+ - name: DevOps
46
+ slug: devops
47
+
48
+ quiz_slug: kcna
49
+
50
+ ctions:
51
+
52
+ - id: kcna-section-01
53
+ title: "Domain 1: Kubernetes Fundamentals (46%)"
54
+ description: Kiến trúc K8s, core objects, networking, storage, RBAC
55
+ sort_order: 1
56
+ lessons:
57
+ - id: kcna-d1-l01
58
+ title: "Bài 1: Kubernetes Architecture & Core Components"
59
+ slug: 01-kien-truc-kubernetes
60
+ description: >-
61
+ Control plane vs Worker node. kube-apiserver, etcd, kube-scheduler,
62
+ controller-manager, kubelet, kube-proxy. Kubernetes objects overview.
63
+ duration_minutes: 55
64
+ is_free: true
65
+ sort_order: 1
66
+ video_url: null
67
+ - id: kcna-d1-l02
68
+ title: "Bài 2: Pods, Workloads & Controllers"
69
+ slug: 02-pods-workloads-controllers
70
+ description: >-
71
+ Pod lifecycle. Deployments, ReplicaSets, StatefulSets, DaemonSets,
72
+ Jobs, CronJobs. Labels, selectors, annotations.
73
+ duration_minutes: 55
74
+ is_free: true
75
+ sort_order: 2
76
+ video_url: null
77
+ - id: kcna-d1-l03
78
+ title: "Bài 3: Services, Networking & Storage"
79
+ slug: 03-services-networking-storage
80
+ description: >-
81
+ ClusterIP, NodePort, LoadBalancer. CoreDNS, Service discovery.
82
+ PersistentVolume, PVC, StorageClass. ConfigMaps & Secrets.
83
+ duration_minutes: 55
84
+ is_free: true
85
+ sort_order: 3
86
+ video_url: null
87
+ - id: kcna-d1-l04
88
+ title: "Bài 4: RBAC & Security Basics"
89
+ slug: 04-rbac-security
90
+ description: >-
91
+ Role, ClusterRole, RoleBinding, ClusterRoleBinding. ServiceAccounts.
92
+ Pod Security Standards. Network Policies overview.
93
+ duration_minutes: 50
94
+ is_free: true
95
+ sort_order: 4
96
+ video_url: null
97
+
98
+ - id: kcna-section-02
99
+ title: "Domain 2: Container Orchestration (22%)"
100
+ description: Container runtimes, OCI, container lifecycle, orchestration patterns
101
+ sort_order: 2
102
+ lessons:
103
+ - id: kcna-d2-l01
104
+ title: "Bài 5: Container Runtimes & OCI Standards"
105
+ slug: 05-container-runtimes-oci
106
+ description: >-
107
+ Docker vs containerd vs CRI-O. OCI Image Spec, OCI Runtime Spec.
108
+ Container lifecycle. Image layers và registry.
109
+ duration_minutes: 50
110
+ is_free: true
111
+ sort_order: 5
112
+ video_url: null
113
+ - id: kcna-d2-l02
114
+ title: "Bài 6: Container Orchestration Patterns"
115
+ slug: 06-orchestration-patterns
116
+ description: >-
117
+ Scheduling, resource management, high availability.
118
+ Multi-tenancy. Namespace isolation. Resource quotas.
119
+ Horizontal Pod Autoscaler, Vertical Pod Autoscaler.
120
+ duration_minutes: 50
121
+ is_free: true
122
+ sort_order: 6
123
+ video_url: null
124
+
125
+ - id: kcna-section-03
126
+ title: "Domain 3: Cloud Native Architecture (16%)"
127
+ description: 12-factor app, microservices, service mesh, serverless
128
+ sort_order: 3
129
+ lessons:
130
+ - id: kcna-d3-l01
131
+ title: "Bài 7: Cloud Native Architecture & Design Patterns"
132
+ slug: 07-cloud-native-architecture
133
+ description: >-
134
+ 12-factor app methodology. Microservices vs Monolith.
135
+ Immutable infrastructure. Service mesh (Istio, Linkerd overview).
136
+ Serverless computing. CNCF landscape.
137
+ duration_minutes: 55
138
+ is_free: true
139
+ sort_order: 7
140
+ video_url: null
141
+
142
+ - id: kcna-section-04
143
+ title: "Domain 4 & 5: Observability & Application Delivery (16%)"
144
+ description: Logging, monitoring, tracing, Helm, GitOps, CI/CD
145
+ sort_order: 4
146
+ lessons:
147
+ - id: kcna-d4-l01
148
+ title: "Bài 8: Cloud Native Observability"
149
+ slug: 08-observability
150
+ description: >-
151
+ Logging với Fluentd/Loki. Metrics với Prometheus & Grafana.
152
+ Distributed tracing với Jaeger/Zipkin. OpenTelemetry.
153
+ Alerting và SLO/SLI/SLA.
154
+ duration_minutes: 50
155
+ is_free: true
156
+ sort_order: 8
157
+ video_url: null
158
+ - id: kcna-d5-l01
159
+ title: "Bài 9: Application Delivery — Helm, GitOps & CI/CD"
160
+ slug: 09-helm-gitops-cicd
161
+ description: >-
162
+ Helm charts, values, templates. GitOps với ArgoCD & Flux.
163
+ CI/CD pipelines cho Kubernetes. Kustomize basics.
164
+ Progressive delivery (canary, blue-green).
165
+ duration_minutes: 50
166
+ is_free: true
167
+ sort_order: 9
168
+ video_url: null