Ngân hàng đề — Google Cloud Associate Cloud Engineer
Tìm thấy 449 câu.
- A Create a Google spreadsheet with multiple Google Cloud resource combinations. On a separate sheet, import the current Google Cloud prices and use these prices for the calculations within formulas.
- B Use the Google Cloud Pricing Calculator and select the Cloud Operations template to define your web application with as much detail as possible.
- C Implement a similar architecture on Google Cloud, and run a reasonable load test on a smaller scale. Check the billing information, and calculate the estimated costs based on the real load your system usually handles.
- D Use the Google Cloud Pricing Calculator to determine the cost of every Google Cloud resource you expect to use. Use similar size instances for the web server, and use your current on-premises machines as a comparison for Cloud SQL.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi mô tả tình huống: Công ty bạn đang chạy một ứng dụng web ba tầng (three-tier web application) trên các máy ảo (virtual machines) sử dụng cơ sở dữ liệu MySQL. Nhiệm vụ là tạo ước tính tổng chi phí hạ tầng đám mây (estimated total cost of cloud infrastructure) để chạy ứng dụng này trên Google Cloud instances (Compute Engine) và Cloud SQL.
📌 Mục tiêu chính: Tìm cách ước tính chi phí nhanh chóng, chính xác mà không cần triển khai thực tế, dựa trên các tài nguyên dự kiến như máy chủ web (web server) và cơ sở dữ liệu Cloud SQL. Đây là kỹ năng cơ bản trong Google Cloud Associate Cloud Engineer, tập trung vào công cụ Pricing Calculator để lập kế hoạch chi phí trước khi migrate từ on-premises sang Google Cloud.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Use the Google Cloud Pricing Calculator to determine the cost of every Google Cloud resource you expect to use. Use similar size instances for the web server, and use your current on-premises machines as a comparison for Cloud SQL.
🛠️ Lý do chọn đáp án này:
- Google Cloud Pricing Calculator là công cụ chính thức, miễn phí và cập nhật realtime (phiên bản mới nhất 2026 hỗ trợ AI-assisted estimation và multi-region pricing) để ước tính chi phí cho mọi tài nguyên như Compute Engine (VM instances) và Cloud SQL.
- Phương pháp so sánh kích thước tương đương (similar size instances) cho web server và dùng máy on-premises hiện tại làm cơ sở so sánh cho Cloud SQL giúp ước tính chính xác mà không cần dữ liệu thực tế, phù hợp cho giai đoạn planning/migration.
- Đây là best practice theo Google Cloud Well-Architected Framework (Migration pillar), tránh lãng phí tài nguyên.
📘 Tài liệu tham khảo:
- Google Cloud Pricing Calculator
- Cloud SQL Pricing (cập nhật 2026: hỗ trợ committed use discounts lên đến 57%).
🧐 Giải thích chi tiết tất cả các phương án
Dưới đây là phân tích từng lựa chọn giữ nguyên văn bản gốc tiếng Anh, với lý do đúng/sai bằng tiếng Việt. Tôi đánh dấu ✅ đúng, ❌ sai để dễ theo dõi.
-
Create a Google spreadsheet with multiple Google Cloud resource combinations. On a separate sheet, import the current Google Cloud prices and use these prices for the calculations within formulas.
❌ Sai vì: Phương pháp thủ công này không chính xác và dễ lỗi, giá Google Cloud thay đổi thường xuyên (hàng quý hoặc theo region), việc import thủ công từ Pricing API hoặc CSV sẽ lỗi thời nhanh chóng. Không phải best practice, tốn thời gian và không hỗ trợ các yếu tố phức tạp như sustained use discounts hay reservations (cập nhật 2026). -
Use the Google Cloud Pricing Calculator and select the Cloud Operations template to define your web application with as much detail as possible.
❌ Sai vì: Pricing Calculator không có "Cloud Operations template" dành riêng cho web application (cập nhật 2026: các template chính là e.g., Web App, Machine Learning, nhưng không phải Cloud Operations – đó là suite monitoring/logging). Sử dụng template sai sẽ dẫn đến ước tính không khớp với three-tier app + Cloud SQL. -
Implement a similar architecture on Google Cloud, and run a reasonable load test on a smaller scale. Check the billing information, and calculate the estimated costs based on the real load your system usually handles.
❌ Sai vì: Cách này tốn kém và không phải ước tính (estimation), mà là proof-of-concept thực tế (PoC). Load test nhỏ scale không phản ánh full load, billing chỉ cho kết quả thực tế chứ không dự báo. Vi phạm nguyên tắc "estimate before build" trong Google Cloud, dễ phát sinh chi phí không kiểm soát (theo Billing best practices 2026). -
Use the Google Cloud Pricing Calculator to determine the cost of every Google Cloud resource you expect to use. Use similar size instances for the web server, and use your current on-premises machines as a comparison for Cloud SQL.
✅ Đúng vì: Như đã giải thích ở trên, đây là phương pháp chuẩn xác, nhanh chóng và scalable. Hỗ trợ export báo cáo PDF/CSV để chia sẻ với stakeholder, tích hợp với Recommender API cho optimization tự động (mới 2026).
🔍 Lời khuyên thêm: Sau khi estimate, dùng Cloud Billing Budgets & Alerts để monitor thực tế. Nếu migrate từ AWS (dù câu hỏi Google-centric), so sánh với AWS Pricing Calculator để TCO analysis! 🚀
-
A
• Navigate to Cloud Monitoring in the Google Cloud console, and create a custom monitoring job for the Bigtable instance to track all changes.
• Create an alert by using webhook endpoints, with the SIEM endpoint as a receiver.
-
B
• Navigate to the Audit Logs page in the Google Cloud console, and enable Admin Write logs for the Bigtable instance.
• Create a Cloud Functions instance to export logs from Cloud Logging to your SIEM.
-
C
• Navigate to the Audit Logs page in the Google Cloud console, and enable Data Read, Data Write and Admin Read logs for the Bigtable instance.
• Create a Pub/Sub topic as a Cloud Logging sink destination, and add your SIEM as a subscriber to the topic.
-
D
• Install the Ops Agent on the Bigtable instance during configuration.
• Create a service account with read permissions for the Bigtable instance.
• Create a custom Dataflow job with this service account to export logs to the company’s SIEM system.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi này xoay quanh việc ghi log toàn diện cho một instance Bigtable trên Google Cloud Platform (GCP) với 3 nodes, lưu trữ dữ liệu thông tin cá nhân có thể nhận dạng (PII - Personally Identifiable Information). Yêu cầu cụ thể là ghi log tất cả các hoạt động đọc (read) hoặc ghi (write), bao gồm cả đọc metadata hoặc cấu hình của bảng cơ sở dữ liệu, và gửi chúng vào hệ thống SIEM (Security Information and Event Management) của công ty.
📘 Bối cảnh kỹ thuật: Bigtable là dịch vụ NoSQL managed của GCP, và để theo dõi các hoạt động nhạy cảm như vậy, chúng ta cần sử dụng Audit Logs (nhật ký kiểm toán) trong Cloud Logging. Audit Logs cho Bigtable hỗ trợ các loại log cụ thể: Data Read, Data Write, Admin Read (để bao quát metadata/config reads), và Admin Write. Logs này phải được kích hoạt riêng cho instance, sau đó export ra SIEM qua các sink phù hợp như Pub/Sub. Kiến thức dựa trên tài liệu GCP cập nhật đến 2026 (Bigtable v2+ và Cloud Logging enhancements).
Mục tiêu chính: Đảm bảo tuân thủ bảo mật PII bằng cách capture đầy đủ logs mà không làm gián đoạn dịch vụ. ❌ Không dùng monitoring thông thường vì chúng không capture audit chi tiết.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng là lựa chọn thứ 3:
• Navigate to the Audit Logs page in the Google Cloud console, and enable Data Read, Data Write and Admin Read logs for the Bigtable instance.
• Create a Pub/Sub topic as a Cloud Logging sink destination, and add your SIEM as a subscriber to the topic.
🛠️ Lý do chi tiết:
- Enable đúng loại logs: Bigtable yêu cầu kích hoạt Data Read (đọc dữ liệu), Data Write (ghi dữ liệu), và Admin Read (đọc metadata/config) trên trang Audit Logs để capture toàn bộ hoạt động yêu cầu. Điều này bao quát chính xác PII reads/writes và config changes (theo docs GCP: Bigtable audit logs hỗ trợ các loại này từ 2021, cập nhật 2025 với chi tiết hơn cho PII compliance).
- Export logs hiệu quả: Tạo Pub/Sub topic làm sink trong Cloud Logging để stream logs real-time. SIEM subscribe topic để nhận logs mà không cần polling phức tạp. Đây là best practice cho SIEM integration (scale tốt, low latency).
- ✅ Hoàn hảo cho yêu cầu: Đầy đủ, managed, chi phí thấp, và tuân thủ GCP security best practices (không cần agent hay job custom).
📘 Nguồn tham khảo:
- Bigtable Audit Logging (GCP docs, cập nhật 2026).
- Cloud Logging Sinks to Pub/Sub (Export logs guide).
❌ Giải thích tất cả các phương án
Dưới đây là phân tích từng lựa chọn một cách chi tiết, giữ nguyên văn bản gốc tiếng Anh. Mỗi phương án được đánh giá đúng/sai với lý do cụ thể dựa trên kiến thức GCP mới nhất.
-
❌ Phương án 1 (SAI):
• Navigate to Cloud Monitoring in the Google Cloud console, and create a custom monitoring job for the Bigtable instance to track all changes.
• Create an alert by using webhook endpoints, with the SIEM endpoint as a receiver.
Lý do sai: Cloud Monitoring (nay là Observability) dùng cho metrics/uptime (CPU, latency), không capture audit logs chi tiết như read/write PII hay metadata. Custom job chỉ track metrics, không phải operations. Webhook alerts chỉ notify, không stream full logs real-time vào SIEM. ❌ Không phù hợp cho compliance PII. -
❌ Phương án 2 (SAI):
• Navigate to the Audit Logs page in the Google Cloud console, and enable Admin Write logs for the Bigtable instance.
• Create a Cloud Functions instance to export logs from Cloud Logging to your SIEM.
Lý do sai: Chỉ enable Admin Write thiếu Data Read/Write và Admin Read, nên bỏ sót reads PII và metadata (yêu cầu bắt buộc). Cloud Functions export có thể dùng nhưng không phải best practice (cold start, quota limits, phức tạp scale cho high-volume Bigtable logs). Pub/Sub sink hiệu quả hơn. ❌ Không đầy đủ logs. -
✅ Phương án 3 (ĐÚNG):
• Navigate to the Audit Logs page in the Google Cloud console, and enable Data Read, Data Write and Admin Read logs for the Bigtable instance.
• Create a Pub/Sub topic as a Cloud Logging sink destination, and add your SIEM as a subscriber to the topic.
Lý do đúng: Như đã giải thích ở phần trên – enable đúng 3 loại logs capture full reads/writes/metadata, và Pub/Sub sink là cách chuẩn để SIEM subscribe real-time. ✅ Scale tốt cho 3-node cluster, low-cost. -
❌ Phương án 4 (SAI):
• Install the Ops Agent on the Bigtable instance during configuration.
• Create a service account with read permissions for the Bigtable instance.
• Create a custom Dataflow job with this service account to export logs to the company’s SIEM system.
Lý do sai: Bigtable là fully managed service, không hỗ trợ install Ops Agent (dành cho Compute Engine VMs). Không có "instance configuration" để install agent. Dataflow job custom quá phức tạp/overkill (batch processing chậm, chi phí cao), thiếu enable audit logs gốc. Service account thừa. ❌ Không khả thi và không hiệu quả.
🧩 Kết luận: Lựa chọn 3 là optimal solution cho security auditing Bigtable PII. Nếu implement, kiểm tra IAM roles như roles/bigtable.admin cho enable logs! 🚀
- A Deploy a private autopilot cluster.
- B Deploy a public autopilot cluster.
- C Deploy a standard public cluster and enable shielded nodes.
- D Deploy a standard private cluster and enable shielded nodes.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi yêu cầu thiết lập một Google Kubernetes Engine (GKE) cluster với các yêu cầu cụ thể sau:
- Verifiable node identity and integrity: Các node phải có khả năng xác thực danh tính và tính toàn vẹn (sử dụng các tính năng như Secure Boot, vTPM - virtual Trusted Platform Module, và Measured Boot để đảm bảo node không bị thay đổi hoặc tấn công).
- Nodes cannot be accessed from the internet: Cluster phải là private cluster, nghĩa là các node không thể truy cập trực tiếp từ internet (chỉ control plane có thể public hoặc private tùy cấu hình).
- Reduce operational cost: Giảm chi phí vận hành bằng cách giảm thiểu việc quản lý thủ công nodes (Google khuyến nghị sử dụng chế độ Autopilot thay vì Standard).
- Follow Google-recommended practices: Tuân thủ các best practices của Google, ưu tiên Autopilot private cluster vì nó tự động kích hoạt shielded nodes và quản lý toàn bộ lifecycle của nodes.
🛠️ Tóm tắt yêu cầu chính: Cần một cluster private, an toàn cao (shielded nodes), chi phí vận hành thấp, và theo khuyến nghị của Google. Đây là tình huống phổ biến trong GKE để bảo mật và tối ưu hóa (dựa trên tài liệu GKE cập nhật đến 2026).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Deploy a private autopilot cluster.
Lý do chi tiết:
- Private cluster ✅: Đảm bảo nodes không accessible từ internet (chỉ control plane có endpoint riêng).
- Autopilot mode ✅: Google tự động quản lý nodes (provisioning, scaling, upgrades, security patches), giảm đáng kể operational cost so với Standard mode (bạn không cần quản lý node pools thủ công).
- Verifiable node identity & integrity ✅: Trong Autopilot private clusters, shielded GKE nodes được kích hoạt mặc định (không cần enable thủ công), cung cấp Secure Boot, vTPM, và integrity monitoring – hoàn toàn đáp ứng yêu cầu.
- Google-recommended ✅: Google ưu tiên Autopilot cho hầu hết workloads mới vì tính đơn giản, an toàn và chi phí thấp (theo best practices 2026).
📋 Giải thích tất cả các phương án
Dưới đây là phân tích từng lựa chọn một cách chi tiết, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh giá dựa trên việc có đáp ứng TẤT CẢ yêu cầu không (private, verifiable integrity, low cost, recommended practices).
-
✅ Deploy a private autopilot cluster.
Giải thích đúng: Phương án này hoàn hảo vì kết hợp private (nodes không accessible internet), Autopilot (giảm cost vận hành tối đa), và shielded nodes mặc định (verifiable identity/integrity). Đây là lựa chọn được Google khuyến nghị cho các workload bảo mật cao, cập nhật đến GKE 1.30+ (2026). -
❌ Deploy a public autopilot cluster.
Giải thích sai: Mặc dù Autopilot giảm cost và có shielded nodes mặc định (verifiable integrity ✅), nhưng public cluster cho phép nodes accessible từ internet (qua authorized networks hoặc VPC), vi phạm yêu cầu "nodes cannot be accessed from the internet". Không phù hợp best practices cho bảo mật cao. -
❌ Deploy a standard public cluster and enable shielded nodes.
Giải thích sai: Shielded nodes có thể enable thủ công (verifiable integrity ✅), nhưng standard mode yêu cầu bạn tự quản lý nodes (cao operational cost ❌), và public cluster làm nodes accessible internet (❌). Không giảm cost và không recommended so với Autopilot. -
❌ Deploy a standard private cluster and enable shielded nodes.
Giải thích sai: Private cluster đúng (nodes không accessible internet ✅), shielded nodes enable được (verifiable integrity ✅), nhưng standard mode vẫn yêu cầu quản lý nodes thủ công (cao operational cost ❌, không theo recommended practices). Autopilot private tốt hơn nhiều.
📘 Tài liệu tham khảo (cập nhật mới nhất đến 2026)
- GKE Autopilot overview 🛠️: Xác nhận shielded nodes mặc định và lợi ích giảm cost.
- Private clusters in GKE 🔒: Nodes không accessible internet.
- Shielded GKE nodes ✅: Verifiable integrity với vTPM/Secure Boot (Autopilot private enable tự động).
- Google Cloud Skills Boost: Associate Cloud Engineer exam guide (2026 edition) – Câu hỏi tương tự trong module GKE security.
Hy vọng phân tích này giúp bạn ôn thi hiệu quả! 🚀 Nếu cần thêm ví dụ thực hành, hãy hỏi nhé.
•A Flask web application
•A backend API
•A scheduled long-running background job for ETL and reporting
You need to keep operational costs low. You want to follow Google-recommended practices to migrate these workloads to serverless solutions on Google Cloud. What should you do?
- A Migrate the web application to App Engine and the backend API to Cloud Run. Use Cloud Tasks to run your background job on Compute Engine.
- B Migrate the web application to App Engine and the backend API to Cloud Run. Use Cloud Tasks to run your background job on Cloud Run.
- C Run the web application on a Cloud Storage bucket and the backend API on Cloud Run. Use Cloud Tasks to run your background job on Cloud Run.
- D Run the web application on a Cloud Storage bucket and the backend API on Cloud Run. Use Cloud Tasks to run your background job on Compute Engine.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi tập trung vào việc di chuyển (migrate) các workload on-premises sang Google Cloud một cách serverless để giảm chi phí vận hành thấp nhất, đồng thời tuân thủ best practices của Google. Các workload bao gồm:
- Flask web application: Ứng dụng web động (dynamic), cần xử lý request từ user.
- Backend API: API phía sau, thường containerized, stateless.
- Scheduled long-running background job cho ETL và reporting: Công việc nền chạy theo lịch, dài hạn (long-running), không cần tương tác user, như trích xuất dữ liệu (ETL) và báo cáo.
Mục tiêu: Sử dụng serverless solutions trên Google Cloud (không quản lý server, auto-scale, pay-per-use) để tối ưu chi phí. Google khuyến nghị: App Engine cho web apps, Cloud Run cho APIs/containers, Cloud Tasks/Cloud Run Jobs cho background tasks.
✅ Đáp án đúng
Migrate the web application to App Engine and the backend API to Cloud Run. Use Cloud Tasks to run your background job on Cloud Run.
Lý do chọn đáp án này:
- 🛠️ App Engine lý tưởng cho Flask web app (hỗ trợ Python runtime chuẩn), tự động scale, serverless hoàn toàn, xử lý traffic web động hiệu quả.
- 🛠️ Cloud Run hoàn hảo cho backend API (container-based, stateless, scale-to-zero, chi phí thấp).
- 🛠️ Cloud Tasks kết hợp Cloud Run cho background job: Cloud Tasks quản lý queue tasks theo lịch (qua Cloud Scheduler), dispatch đến Cloud Run (qua HTTP target hoặc Cloud Run Jobs cho long-running batch). Đây là serverless thuần túy, long-running jobs trên Cloud Run hỗ trợ timeout dài (lên đến 60 phút), phù hợp ETL/reporting, và cập nhật mới nhất (2023-2026) với Cloud Run Jobs fully GA.
- 📈 Tối ưu chi phí: Tất cả scale-to-zero, chỉ tính phí khi chạy, theo Google best practices cho migration (Lift-and-shift to serverless).
📋 Giải thích chi tiết từng phương án
-
❌ Migrate the web application to App Engine and the backend API to Cloud Run. Use Cloud Tasks to run your background job on Compute Engine.
Phương án này sai vì sử dụng Compute Engine cho background job. Compute Engine là VM-based (không serverless), phải quản lý instance, luôn-on (hoặc auto-scale groups), dẫn đến chi phí cao hơn so với serverless. Không tuân thủ yêu cầu serverless thuần túy và best practices của Google cho migration. -
✅ Migrate the web application to App Engine and the backend API to Cloud Run. Use Cloud Tasks to run your background job on Cloud Run.
Phương án đúng như đã giải thích ở trên: Toàn bộ serverless, tối ưu chi phí, phù hợp workload (web động → App Engine, API → Cloud Run, long-running job → Cloud Tasks + Cloud Run). -
❌ Run the web application on a Cloud Storage bucket and the backend API on Cloud Run. Use Cloud Tasks to run your background job on Cloud Run.
Phương án này sai vì Cloud Storage bucket chỉ hỗ trợ static website hosting (HTML/CSS/JS tĩnh), không chạy được Flask web app động (cần server-side execution, Python runtime). Flask yêu cầu xử lý request động → phải dùng App Engine hoặc tương tự, không phải Storage. -
❌ Run the web application on a Cloud Storage bucket and the backend API on Cloud Run. Use Cloud Tasks to run your background job on Compute Engine.
Phương án này sai kép: (1) Cloud Storage không phù hợp Flask web (như trên); (2) Compute Engine cho job không serverless, chi phí cao, vi phạm yêu cầu.
📘 Tài liệu tham khảo (cập nhật đến 2026)
- Google Cloud Migrate to Serverless: cloud.google.com/architecture/migration-to-gcp-serverless – Best practices cho web/API/background jobs.
- App Engine docs: cloud.google.com/appengine/docs/standard/python3 – Flask migration.
- Cloud Run: cloud.google.com/run/docs – Jobs cho long-running (GA từ 2023).
- Cloud Tasks: cloud.google.com/tasks/docs – Target Cloud Run/HTTP.
- Well-Architected Framework: cloud.google.com/architecture/framework – Cost optimization pillar.
-
A
• Attach a single service account to the compute instances.
• Add minimal rights to the service account.
• Allow the service account to impersonate a Cloud Identity user with elevated permissions to create, update, or delete resources. -
B
• Add a step for human approval to the CI/CD pipeline before the execution of the infrastructure provisioning.
• Use the human approvals IAM account for the provisioning. -
C
• Attach a single service account to the compute instances.
• Add all required Identity and Access Management (IAM) permissions to this service account to create, update, or delete resources. -
D
• Create multiple service accounts, one for each pipeline with the appropriate minimal Identity and Access Management (IAM) permissions.
• Use a secret manager service to store the key files of the service accounts.
• Allow the CI/CD pipeline to request the appropriate secrets during the execution of the pipeline.
Xem giải thích
🧩 Giải thích nội dung câu hỏi
Câu hỏi tập trung vào việc di chuyển pipeline CI/CD (Continuous Integration/Continuous Delivery) sang các instance Compute Engine trên Google Cloud Platform (GCP). Pipeline này sẽ quản lý toàn bộ hạ tầng đám mây thông qua code (Infrastructure as Code - IaC), chẳng hạn như sử dụng Terraform hoặc các công cụ tương tự. Mục tiêu là đảm bảo pipeline có quyền hạn phù hợp (appropriate permissions) đồng thời tuân thủ các thực hành bảo mật tốt nhất (security best practices).
Các vấn đề chính cần giải quyết:
- Principle of least privilege: Chỉ cấp quyền tối thiểu cần thiết.
- Tránh rủi ro tập trung quyền hạn: Không dùng một service account duy nhất cho mọi việc.
- Quản lý bí mật an toàn: Lưu trữ và truy xuất khóa service account một cách bảo mật.
- Tự động hóa: Pipeline phải chạy tự động mà không cần can thiệp thủ công.
Đây là tình huống thực tế trong GCP, nơi Compute Engine sử dụng service accounts để cấp quyền IAM cho các instance, giúp pipeline tương tác với các dịch vụ GCP như tạo VM, network, v.v. (Kiến thức cập nhật GCP IAM & Secret Manager phiên bản mới nhất 2024-2026).
📘 Tài liệu tham khảo:
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng:
• Create multiple service accounts, one for each pipeline with the appropriate minimal Identity and Access Management (IAM) permissions.
• Use a secret manager service to store the key files of the service accounts.
• Allow the CI/CD pipeline to request the appropriate secrets during the execution of the pipeline.
Lý do: 🛡️ Phương án này tuân thủ principle of least privilege bằng cách tạo nhiều service account riêng biệt cho từng pipeline, chỉ cấp quyền IAM tối thiểu cần thiết (ví dụ: roles/compute.instanceAdmin cho pipeline tạo VM). Sử dụng Secret Manager để lưu trữ key files an toàn, hỗ trợ rotation tự động và audit logs. Pipeline yêu cầu secrets động trong runtime, giảm rủi ro lộ key lâu dài. Đây là best practice GCP 2024-2026, tránh hardcode secrets và hỗ trợ zero-trust model.
❌ Giải thích tất cả các phương án
Dưới đây là phân tích chi tiết từng lựa chọn, với đánh giá đúng/sai dựa trên security best practices GCP:
-
❌ Phương án SAI 1:
• Attach a single service account to the compute instances.
• Add minimal rights to the service account.
• Allow the service account to impersonate a Cloud Identity user with elevated permissions to create, update, or delete resources.
Giải thích: Mặc dù có "minimal rights" nhưng việc gắn single service account tạo single point of failure và rủi ro lan tỏa nếu bị compromise. Impersonate Cloud Identity user (quaiam.serviceAccounts.actAs) không an toàn cho pipeline tự động vì user có quyền cao hơn, dễ bị lạm dụng và khó audit. Không khuyến khích trong best practices GCP (thay vào đó dùng workload identity federation nếu có). -
❌ Phương án SAI 2:
• Add a step for human approval to the CI/CD pipeline before the execution of the infrastructure provisioning.
• Use the human approvals IAM account for the provisioning.
Giải thích: Thêm human approval làm gián đoạn tự động hóa CI/CD, không phù hợp với pipeline IaC nhanh chóng. Sử dụng human IAM account (như user account) cho provisioning tự động là vi phạm separation of duties, dễ bị phishing và không hỗ trợ key rotation. GCP khuyến nghị service accounts cho workload, không dùng human account. -
❌ Phương án SAI 3:
• Attach a single service account to the compute instances.
• Add all required Identity and Access Management (IAM) permissions to this service account to create, update, or delete resources.
Giải thích: Single service account với tất cả quyền cần thiết vi phạm least privilege (quá rộng, ví dụroles/ownerthay vì role cụ thể), tạo blast radius lớn nếu bị hack. Không khuyến khích dùng một SA cho nhiều pipeline, dễ dẫn đến privilege creep. GCP docs nhấn mạnh multiple scoped SAs thay thế.
🧠 Tóm tắt key takeaways: Sử dụng multiple minimal SAs + Secret Manager là cách tối ưu cho CI/CD trên Compute Engine, đảm bảo bảo mật cao, dễ quản lý và scale theo tiêu chuẩn GCP mới nhất! 🚀
- A Create an object lifecycle on the storage bucket to change the storage class to Archive Storage for objects with an age over 30 days.
- B Create a cron job in Cloud Scheduler to call a Cloud Functions instance every day to delete files older than 30 days.
- C Create a retention policy on the storage bucket of 30 days, and lock the bucket by using a retention policy lock.
- D Enable object versioning on the storage bucket and add lifecycle rules to expire non-current versions after 30 days.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi này thuộc chủ đề Google Cloud Storage (GCS), tập trung vào việc quản lý chi phí lưu trữ tự động cho các bucket chứa file.
- Tình huống: Ứng dụng lưu trữ file trên GCS sử dụng lớp lưu trữ Standard Storage class (phù hợp cho dữ liệu truy cập thường xuyên, chi phí cao hơn). Tuy nhiên, ứng dụng chỉ cần truy cập file được tạo trong 30 ngày gần nhất, nghĩa là file cũ hơn 30 ngày không còn được sử dụng và có thể chuyển sang lớp lưu trữ rẻ hơn để tiết kiệm chi phí mà không cần xóa.
- Yêu cầu: Tìm giải pháp tự động (automatic) để giảm chi phí cho file "không còn được truy cập" (no longer accessed), tức là file có tuổi thọ (age) > 30 ngày.
- Mục tiêu chính: Sử dụng tính năng Object Lifecycle Management của GCS để chuyển lớp lưu trữ (storage class transition) sang loại rẻ hơn như Archive Storage (dành cho dữ liệu hiếm khi truy cập, chi phí lưu trữ thấp nhất nhưng truy xuất chậm và đắt hơn).
📘 Tài liệu tham khảo:
- Lifecycle management rules | Cloud Storage | Google Cloud (cập nhật đến 2024-2026, hỗ trợ transition sang Archive/Deep Archive sau Age threshold).
- Storage classes | Cloud Storage | Google Cloud (Standard → Archive để tối ưu chi phí).
✅ Đáp án đúng
Create an object lifecycle on the storage bucket to change the storage class to Archive Storage for objects with an age over 30 days.
Lý do chọn đáp án này 🛠️:
- Đây là giải pháp tự động, chính xác và tối ưu nhất theo best practice của Google Cloud.
- Object Lifecycle cho phép thiết lập quy tắc chuyển storage class (transition) dựa trên Age > 30 days sang Archive Storage (chi phí lưu trữ chỉ ~$0.0012/GB/tháng, rẻ hơn Standard ~10 lần).
- File vẫn được giữ nguyên, chỉ thay đổi class để tiết kiệm mà không ảnh hưởng truy cập (dù Archive có độ trễ cao, phù hợp vì "no longer accessed").
- Không xóa dữ liệu, phù hợp yêu cầu "save costs on files" thay vì mất dữ liệu.
❌ Phân tích tất cả các phương án
-
Create an object lifecycle on the storage bucket to change the storage class to Archive Storage for objects with an age over 30 days.
✅ Đúng như đã giải thích ở trên. Đây là tính năng native của GCS, dễ triển khai qua Console/gcloud/JSON rule:{"action": {"type": "SetStorageClass", "storageClass": "ARCHIVE"}, "condition": {"age": 30}}. -
Create a cron job in Cloud Scheduler to call a Cloud Functions instance every day to delete files older than 30 days.
❌ Sai. Phương án này xóa file (delete) thay vì giữ và tiết kiệm chi phí. Cloud Scheduler + Cloud Functions là cách thủ công, tốn kém (chi phí compute hàng ngày), không tự động như Lifecycle, và vi phạm yêu cầu "save costs on files" (dữ liệu bị mất vĩnh viễn). -
Create a retention policy on the storage bucket of 30 days, and lock the bucket by using a retention policy lock.
❌ Sai. Retention policy (Object Hold/Retention) dùng để ngăn xóa/chỉnh sửa file trong 30 ngày (compliance/legal), không thay đổi storage class hay tiết kiệm chi phí. Locking bucket làm retention "không thể thay đổi", nhưng không giải quyết vấn đề chuyển class cho file cũ. -
Enable object versioning on the storage bucket and add lifecycle rules to expire non-current versions after 30 days.
❌ Sai. Object versioning giữ nhiều version của file (tăng chi phí lưu trữ). Quy tắc expire chỉ xóa non-current versions (không phải dựa trên age của object gốc), không chuyển storage class cho file chính. Không phù hợp vì ứng dụng cần file gốc >30 days vẫn tồn tại nhưng rẻ hơn.
🧩 Kết luận: Sử dụng Object Lifecycle là cách scaleable, zero-effort nhất trên GCS (không tốn compute/additional services). Áp dụng ngay để đạt Associate Cloud Engineer certification! 🚀
- A Configure the Horizontal Pod Autoscaler for availability, and configure the cluster autoscaler for suggestions.
- B Configure the Horizontal Pod Autoscaler for availability, and configure the Vertical Pod Autoscaler recommendations for suggestions.
- C Configure the Vertical Pod Autoscaler recommendations for availability, and configure the Cluster autoscaler for suggestions.
- D Configure the Vertical Pod Autoscaler recommendations for availability, and configure the Horizontal Pod Autoscaler for suggestions.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi mô tả tình huống: Quản lý yêu cầu triển khai một workload lên Kubernetes cluster (cụ thể là GKE - Google Kubernetes Engine). Bạn không chắc chắn về yêu cầu tài nguyên (CPU và memory) của workload, vì chúng có thể thay đổi tùy theo mẫu sử dụng, phụ thuộc bên ngoài hoặc các yếu tố khác. Giải pháp cần:
- Gợi ý tối ưu chi phí về CPU/memory.
- Đảm bảo workload hoạt động ổn định trong mọi tình huống.
- Tuân thủ best practices của Google.
🛠️ Mục tiêu chính: Kết hợp công cụ tự động scale để availability (khả dụng cao) và recommendations (gợi ý tài nguyên), giúp workload linh hoạt mà không lãng phí tài nguyên. Đây là thực hành tiêu chuẩn trên GKE (cập nhật đến 2026, theo docs GKE 1.29+ với VPA v0.13+).
📘 Tài liệu tham khảo:
- Google Cloud GKE Autoscaling Best Practices
- Vertical Pod Autoscaler (VPA) Documentation
- Horizontal Pod Autoscaler (HPA) on GKE
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Configure the Horizontal Pod Autoscaler for availability, and configure the Vertical Pod Autoscaler recommendations for suggestions.
Lý do 🧩:
- HPA (Horizontal Pod Autoscaler) đảm bảo availability bằng cách tăng/giảm số lượng Pod ngang (horizontal scaling) dựa trên metrics như CPU/memory usage, giúp workload chịu tải cao và ổn định.
- VPA recommendations (chế độ Recommender) gợi ý chính xác CPU/memory requests/limits dựa trên lịch sử sử dụng thực tế, giúp tối ưu chi phí mà không cần đoán trước.
- Google-recommended: Kết hợp HPA + VPA là best practice cho workload không chắc chắn resources (VPA gợi ý, HPA scale). Không dùng Cluster Autoscaler vì nó scale nodes (không phải Pod resources).
📋 Giải thích tất cả các phương án
-
[SAI] Configure the Horizontal Pod Autoscaler for availability, and configure the cluster autoscaler for suggestions.
❌ Sai vì: Cluster Autoscaler chỉ scale số lượng nodes trong cluster (không gợi ý CPU/memory cho Pod). HPA đúng cho availability, nhưng thiếu tool gợi ý resources → không cost-effective và không match Google practices. -
[ĐÚNG] Configure the Horizontal Pod Autoscaler for availability, and configure the Vertical Pod Autoscaler recommendations for suggestions.
✅ Đúng vì: HPA lo availability (scale Pod số lượng), VPA recommendations gợi ý CPU/memory tối ưu dựa trên data thực tế. Hoàn hảo cho workload biến động, tuân thủ Google best practices trên GKE. -
[SAI] Configure the Vertical Pod Autoscaler recommendations for availability, and configure the Cluster autoscaler for suggestions.
❌ Sai vì: VPA recommendations không phải cho availability (nó chỉ gợi ý, không scale realtime). Cluster Autoscaler không gợi ý Pod resources → không đảm bảo workload ổn định hoặc cost-effective. -
[SAI] Configure the Vertical Pod Autoscaler recommendations for availability, and configure the Horizontal Pod Autoscaler for suggestions.
❌ Sai vì: VPA recommendations không đảm bảo availability (chỉ gợi ý, cần Update/Auto mode cho adjust nhưng không scale số Pod). HPA không dùng cho "suggestions" (nó scale dựa metrics, không recommend resources) → đảo ngược vai trò.
•Documents must be kept for five years.
•Up to five revisions of the same invoice document must be stored, to allow for corrections.
•Documents older than 365 days should be moved to lower cost storage tiers.
You want to follow Google-recommended practices to minimize your operational and development costs. What should you do?
- A Enable retention policies on the bucket, and use Cloud Scheduler to invoke a Cloud Function to move or delete your documents based on their metadata.
- B Enable retention policies on the bucket, use lifecycle rules to change the storage classes of the objects, set the number of versions, and delete old files.
- C Enable object versioning on the bucket, and use Cloud Scheduler to invoke a Cloud Functions instance to move or delete your documents based on their metadata.
- D Enable object versioning on the bucket, use lifecycle conditions to change the storage class of the objects, set the number of versions, and delete old files.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi tập trung vào việc di chuyển (migrate) các tài liệu hóa đơn (invoice documents) từ on-premises lên Google Cloud Storage (GCS), với các yêu cầu lưu trữ cụ thể sau:
- 📅 Tài liệu phải được giữ trong 5 năm (để đảm bảo tuân thủ quy định lưu trữ lâu dài).
- 🔄 Lưu tối đa 5 phiên bản sửa chữa (revisions) của cùng một tài liệu hóa đơn (để hỗ trợ chỉnh sửa và theo dõi lịch sử thay đổi).
- 💰 Tài liệu cũ hơn 365 ngày phải chuyển sang các lớp lưu trữ chi phí thấp hơn (như Nearline, Coldline hoặc Archive để tối ưu hóa chi phí).
🎯 Mục tiêu chính: Áp dụng các thực hành tốt nhất được Google khuyến nghị (Google-recommended practices) để giảm thiểu chi phí vận hành (operational costs) và phát triển (development costs). Điều này nhấn mạnh việc sử dụng các tính năng tích hợp sẵn của GCS như Object Versioning (cho phép lưu nhiều phiên bản) và Lifecycle Rules/Conditions (tự động chuyển lớp lưu trữ, xóa phiên bản cũ), thay vì các giải pháp tùy chỉnh phức tạp như Cloud Functions hoặc Cloud Scheduler (sẽ tăng chi phí và công quản lý).
Kiến thức cập nhật đến 2026: GCS hỗ trợ Object Lifecycle Management với các điều kiện linh hoạt (conditions) cho phiên bản live/noncurrent, cho phép chuyển storage class sau 365 ngày, giới hạn số phiên bản (qua quy tắc xóa noncurrent versions), và xóa file cũ sau 5 năm (1825 ngày). Không cần code tùy chỉnh để tuân thủ.
📘 Tài liệu tham khảo:
- Object Versioning (GCS docs).
- Lifecycle Management (hỗ trợ transition/delete cho versioned objects, cập nhật 2024-2026).
- Best Practices for Storage (khuyến nghị dùng lifecycle thay vì custom automation).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Enable object versioning on the bucket, use lifecycle conditions to change the storage class of the objects, set the number of versions, and delete old files.
Lý do chọn đáp án này 🛠️:
- ✅ Enable object versioning: Cho phép lưu tối đa 5 revisions (phiên bản noncurrent) tự động, đáp ứng yêu cầu theo dõi sửa chữa mà không mất dữ liệu.
- ✅ Use lifecycle conditions: Tự động chuyển objects >365 ngày sang storage class rẻ hơn (ví dụ: Standard → Nearline/Coldline), và set the number of versions (qua quy tắc "Delete noncurrent versions if exceeds N" hoặc age-based), xóa old files sau 5 năm.
- ✅ Tối ưu chi phí: Sử dụng tính năng built-in của GCS, không cần code, scheduler hay function → Giảm operational/dev costs theo best practices Google. Hoàn hảo khớp tất cả yêu cầu!
❌ Phân tích tất cả các phương án (đúng/sai)
Dưới đây là phân tích chi tiết từng lựa chọn, giữ nguyên văn bản gốc tiếng Anh. Tôi đánh dấu ✅ đúng hoặc ❌ sai, kèm giải thích bằng tiếng Việt:
-
Enable retention policies on the bucket, and use Cloud Scheduler to invoke a Cloud Function to move or delete your documents based on their metadata.
❌ Sai: Retention policies dùng cho WORM compliance (khóa objects không xóa trước thời hạn), không hỗ trợ versioning/revisions linh hoạt hay chuyển storage class tự động. Cloud Scheduler + Cloud Function là custom code → Tăng chi phí dev/ops, không phải best practice (phải viết code kiểm tra metadata thủ công). -
Enable retention policies on the bucket, use lifecycle rules to change the storage classes of the objects, set the number of versions, and delete old files.
❌ Sai: Retention policies xung đột với lifecycle (khóa objects, khó xóa/delete versions hoặc chuyển class). Không hỗ trợ "set number of versions" hiệu quả, và retention không dành cho revisions động → Không khớp yêu cầu 5 revisions + tự động hóa. -
Enable object versioning on the bucket, and use Cloud Scheduler to invoke a Cloud Functions instance to move or delete your documents based on their metadata.
❌ Sai: Versioning đúng, nhưng dùng Cloud Scheduler + Functions là overkill (custom logic dựa metadata) → Tăng chi phí (chạy định kỳ, billing theo invocation) và ops complexity. Google recommend lifecycle built-in thay vì automation tùy chỉnh. -
Enable object versioning on the bucket, use lifecycle conditions to change the storage class of the objects, set the number of versions, and delete old files.
✅ Đúng (như đã giải thích ở trên): Toàn diện, tự động, chi phí thấp, theo best practices GCS! 🎉
- A Configure username and password by using gcloud config set proxy/username and gcloud config set proxy/password commands.
- B Encode username and password in sha256 encoding, and save in to a text file. Use filename as a value in the gcloud config set core/custom_ca_certs_file command.
- C Provide values for CLOUDSDK_PROXY_USERNAME and CLOUDSDK_PROXY_PASSWORD in the gcloud CLI tool configuration file.
-
D
Set the CLOUDSDK_PROXY_USERNAME and CLOUDSDK_PROXY_PASSWORD properties by using environment variables in your command line tool.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi tập trung vào việc cấu hình proxy cho Google Cloud CLI (gcloud) trên máy trạm cá nhân. Người dùng đã cài đặt gcloud CLI và thiết lập proxy, nhưng lo ngại rằng credentials proxy (tên người dùng và mật khẩu) có thể bị ghi lại trong logs của gcloud CLI. Mục tiêu là ngăn chặn việc ghi logs credentials này một cách an toàn.
📘 Bối cảnh kỹ thuật:
- Google Cloud CLI hỗ trợ proxy để kết nối qua firewall/corporate proxy yêu cầu authentication (Basic Auth).
- Logs của gcloud CLI có thể ghi lại thông tin nhạy cảm nếu chúng được lưu trữ trực tiếp trong file cấu hình (như
~/.config/gcloud/configurations/config_default). - Giải pháp cần đảm bảo credentials không bị lưu persistent và không xuất hiện trong logs, theo best practices bảo mật (cập nhật đến phiên bản gcloud CLI mới nhất năm 2026, dựa trên tài liệu chính thức Google Cloud SDK v470+).
🛠️ Yêu cầu chính: Chọn phương án tránh lưu credentials vào config/logs, ưu tiên sử dụng environment variables để truyền động.
✅ Đáp án đúng
Set the CLOUDSDK_PROXY_USERNAME and CLOUDSDK_PROXY_PASSWORD properties by using environment variables in your command line tool.
Lý do chọn đáp án này:
- 🛡️ An toàn cao nhất: Environment variables (biến môi trường) như
export CLOUDSDK_PROXY_USERNAME=your_usernamevàexport CLOUDSDK_PROXY_PASSWORD=your_passwordchỉ tồn tại trong session hiện tại, không lưu vào file config và không bị ghi vào logs của gcloud CLI (theo cơ chế logging của SDK, chỉ log các tham số config persistent). - 📱 Cách sử dụng: Chạy lệnh trước khi thực thi gcloud, ví dụ:
export CLOUDSDK_PROXY_USERNAME=proxyuser export CLOUDSDK_PROXY_PASSWORD=proxypass gcloud compute instances list - ✅ Tuân thủ best practices: Google khuyến nghị sử dụng env vars cho proxy auth để tránh leak credentials (không thay đổi đến 2026).
❌ Phân tích tất cả các phương án
Dưới đây là giải thích chi tiết từng lựa chọn, đánh dấu ✅ (đúng) hoặc ❌ (sai), giữ nguyên văn bản gốc tiếng Anh:
-
Configure username and password by using gcloud config set proxy/username and gcloud config set proxy/password commands.
❌ Sai: Lệnh này lưu credentials trực tiếp vào file config (~/.config/gcloud/...), dẫn đến bị ghi logs khi debug hoặc inspect config. Rủi ro bảo mật cao, vi phạm nguyên tắc "không lưu plain-text creds". -
Encode username and password in sha256 encoding, and save in to a text file. Use filename as a value in the gcloud config set core/custom_ca_certs_file command.
❌ Sai hoàn toàn:core/custom_ca_certs_filechỉ dùng cho CA certificates (xác thực proxy server), không liên quan đến username/password.- Sha256 encoding không dùng cho auth (proxy cần plain-text Basic Auth), và vẫn lưu file dễ leak. Đây là phương án bịa đặt, không tồn tại trong docs.
-
Provide values for CLOUDSDK_PROXY_USERNAME and CLOUDSDK_PROXY_PASSWORD in the gcloud CLI tool configuration file.
❌ Sai: Lưu trực tiếp vào file config (properties file của gcloud), khiến credentials bị expose trong logs khi gcloud đọc config (ví dụ:gcloud config listhoặc debug mode). Không an toàn như env vars. -
Set the CLOUDSDK_PROXY_USERNAME and CLOUDSDK_PROXY_PASSWORD properties by using environment variables in your command line tool.
✅ Đúng (như đã giải thích ở trên): Env vars là cách tối ưu, ephemeral, tránh logs và persistent storage.
📘 Tài liệu tham khảo
- Chính thức Google Cloud: Configure the gcloud CLI to work behind a proxy/firewall (cập nhật 2025-2026).
- Proxy Auth cụ thể: Environment variables for proxy – Xác nhận env vars không log creds.
- Logging behavior: gcloud CLI logs – Chỉ log config params, bỏ qua env vars nhạy cảm.
- Best practices bảo mật: Google Cloud Security Best Practices (phiên bản 2026).
🛡️ Lời khuyên: Luôn dùng ~/.bashrc hoặc shell profile để set env vars tự động, kết hợp gcloud config set proxy/type http và proxy/address. Nếu cần hỗ trợ thêm, hỏi nhé! 🚀
- A Create a cluster with a single node-pool by using standard VMs. Label he fault-tolerant Deployments as spot_true.
- B Create a cluster with a single node-pool by using Spot VMs. Label the critical Deployments as spot_false.
- C Create a cluster with both a Spot VM node pool and a node pool by using standard VMs. Deploy the critical deployments on the Spot VM node pool and the fault-tolerant deployments on the node pool by using standard VMs.
- D Create a cluster with both a Spot VM node pool and a nods pool by using standard VMs. Deploy the critical deployments on the node pool by using standard VMs and the fault-tolerant deployments on the Spot VM node pool.
Xem giải thích
🧩 Giải thích nội dung câu hỏi
Câu hỏi yêu cầu cấu hình một Google Kubernetes Engine (GKE) cluster để triển khai ứng dụng của công ty. Ứng dụng có hai loại phần:
- Phần không fault-tolerant (không chịu lỗi tốt, có thể chấp nhận downtime).
- Phần critical (phải luôn available, không được downtime).
Mục tiêu là tối ưu hóa chi phí (optimize for cost). Trong GKE, Spot VMs (trước đây gọi là Preemptible VMs) rẻ hơn đáng kể (giảm tới 60-91% chi phí) so với standard VMs, nhưng Spot VMs có thể bị preempt (ngừng đột ngột) bất cứ lúc nào khi GCP cần tài nguyên. Do đó, cần tách riêng node pools để deploy phù hợp: Spot cho phần chịu downtime, standard cho phần critical. Kiến thức dựa trên tài liệu GCP cập nhật 2024-2026 (GKE phiên bản 1.29+ hỗ trợ Spot node pools tốt hơn với taint/nodeSelector).
📘 Tài liệu tham khảo:
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Create a cluster with both a Spot VM node pool and a nods pool by using standard VMs. Deploy the critical deployments on the node pool by using standard VMs and the fault-tolerant deployments on the Spot VM node pool.
Lý do:
- Tạo cluster với hai node pools: Một dùng Spot VMs (rẻ, phù hợp phần fault-tolerant chấp nhận downtime) và một dùng standard VMs (đáng tin cậy, cho phần critical luôn available).
- Deploy critical deployments lên standard node pool 🛡️ (tránh preempt).
- Deploy fault-tolerant deployments lên Spot node pool 💰 (tiết kiệm chi phí).
- Đây là best practice của GKE để cân bằng cost và availability, sử dụng nodeSelector hoặc taints/tolerations để schedule Pods đúng pool.
📋 Phân tích tất cả các phương án
🛠️ Phương án 1:
Create a cluster with a single node-pool by using standard VMs. Label he fault-tolerant Deployments as spot_true.
❌ Sai vì: Chỉ dùng single node-pool với standard VMs → Không tiết kiệm chi phí (Spot VMs rẻ hơn). Label "spot_true" không phải cơ chế chuẩn của GKE (GKE không tự động migrate dựa trên label như vậy). Không tách riêng workloads, dẫn đến chi phí cao và không optimize.
🛠️ Phương án 2:
Create a cluster with a single node-pool by using Spot VMs. Label the critical Deployments as spot_false.
❌ Sai vì: Toàn bộ cluster dùng single Spot node-pool → Critical deployments có nguy cơ bị preempt (downtime), vi phạm yêu cầu "must always be available". Label "spot_false" không có tác dụng thực tế trong GKE để tránh Spot.
🛠️ Phương án 3:
Create a cluster with both a Spot VM node pool and a node pool by using standard VMs. Deploy the critical deployments on the Spot VM node pool and the fault-tolerant deployments on the node pool by using standard VMs.
❌ Sai vì: Deploy ngược chiều: Critical lên Spot (rủi ro cao, có thể downtime) và fault-tolerant lên standard (lãng phí chi phí). Không đáp ứng yêu cầu availability cho critical parts.
🛠️ Phương án 4 (Đúng):
Create a cluster with both a Spot VM node pool and a nods pool by using standard VMs. Deploy the critical deployments on the node pool by using standard VMs and the fault-tolerant deployments on the Spot VM node pool.
✅ Đúng vì: Như giải thích ở trên, tách đúng workloads: Standard cho critical (stable) và Spot cho fault-tolerant (cost-saving). Sử dụng gcloud container node-pools create với --enable-spot-nodes cho Spot pool, và nodeAffinity để deploy chính xác. Lưu ý lỗi đánh máy "nods pool" → node pool, nhưng ý đúng.