Ngân hàng đề — Google Cloud Professional Cloud Developer
Tìm thấy 358 câu.
- A Store user data on a Cloud Shell home disk, and log in at least every 120 days to prevent its deletion.
- B Store user data on a persistent disk in a Compute Engine instance.
- C Store user data in a Cloud Storage bucket.
- D Store user data in BigQuery tables.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi mô tả tình huống: Bạn là lập trình viên tại một tổ chức tài chính, sử dụng Cloud Shell (công cụ shell dựa trên trình duyệt của Google Cloud) để tương tác với các dịch vụ Google Cloud. Dữ liệu người dùng (user data) hiện đang lưu trữ trên ephemeral disk (đĩa tạm thời, chỉ tồn tại trong phiên làm việc và bị xóa khi session kết thúc). Tuy nhiên, một quy định mới (regulation) cấm lưu trữ thông tin nhạy cảm (sensitive information) trên ephemeral disk. Bạn cần triển khai giải pháp lưu trữ mới cho dữ liệu người dùng, đồng thời tối thiểu hóa thay đổi code (minimize code changes).
Mục tiêu chính:
- Dữ liệu phải persistent (bền vững, không bị xóa tự động).
- Tuân thủ quy định: Không dùng ephemeral.
- Giữ nguyên code càng nhiều càng tốt (nghĩa là ưu tiên giải pháp giống file system cục bộ/block storage).
📘 Kiến thức nền tảng (cập nhật đến 2024-2026):
- Cloud Shell sử dụng ephemeral boot disk (khoảng 5GB, reset mỗi session) và persistent home disk (5GB, mounted tại $HOME, nhưng bị xóa nếu không login ≥120 ngày theo chính sách Google Cloud).
- Persistent Disk (PD) là block storage bền vững cho Compute Engine VM, có thể attach/remove, hỗ trợ encryption, và tồn tại độc lập.
- Nguồn: Google Cloud Docs - Cloud Shell, Persistent Disk, Cloud Shell limitations (không thay đổi lớn đến 2026).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Store user data on a persistent disk in a Compute Engine instance.
Lý do 🛠️:
- Persistent Disk (PD) là block storage (giống đĩa cứng cục bộ), có thể attach trực tiếp vào Compute Engine VM, cho phép code hiện tại (giả sử đang đọc/ghi file local như trên ephemeral disk) chỉ cần thay đổi đường dẫn mount mà không cần sửa code lớn (ví dụ: thay
/tmp/databằng/mnt/persistent/data). - PD bền vững vĩnh viễn (không tự xóa), hỗ trợ encryption at-rest, snapshots, và phù hợp sensitive data theo quy định (không như ephemeral).
- Chuyển từ Cloud Shell ephemeral sang Compute Engine PD giữ nguyên mô hình "local file access", minimize code changes. VM Compute Engine có thể dùng tương tự Cloud Shell để interact services.
- Cập nhật 2026: PD hỗ trợ PD Extreme (high IOPS), nhưng cơ bản không đổi.
📋 Giải thích tất cả các phương án (đúng/sai)
-
Store user data on a Cloud Shell home disk, and log in at least every 120 days to prevent its deletion.
❌ Sai vì: Cloud Shell home disk ($HOME) là persistent (5GB), nhưng theo chính sách Google Cloud, nó bị xóa tự động nếu không login ≥120 ngày. Điều này không đảm bảo tuân thủ quy định lâu dài cho sensitive data (rủi ro mất dữ liệu nếu quên login). Ngoài ra, dung lượng hạn chế và không scalable như PD thực thụ. -
Store user data on a persistent disk in a Compute Engine instance.
✅ Đúng (như giải thích trên). Đây là lựa chọn tối ưu: block storage bền vững, minimize code changes, phù hợp regulation. -
Store user data in a Cloud Storage bucket.
❌ Sai vì: Cloud Storage là object storage (không phải block/file system), yêu cầu thay đổi code lớn (sử dụng gsutil hoặc SDK nhưgs://bucket/filethay vì local path). Không phù hợp "minimize code changes", và không giống ephemeral disk (local access). Dù durable/encrypted, nhưng không phải giải pháp file-based. -
Store user data in BigQuery tables.
❌ Sai vì: BigQuery là data warehouse cho analytics (structured/semi-structured data), không phải storage cho general user data file. Yêu cầu thay đổi code hoàn toàn (SQL queries, không read/write file trực tiếp). Không phù hợp sensitive file data hoặc minimize changes; chỉ dùng cho querying lớn.
Kết luận 🎯: Chọn Persistent Disk trên Compute Engine để cân bằng persistence, compliance và low-code-impact. Nếu triển khai, dùng lệnh gcloud compute disks create và gcloud compute instances attach-disk!
- A Use the Bucket Lock feature to set the retention policy on the data.
- B Run a scheduled job to set the storage class to Coldline for objects older than 14 days.
- C Create a JSON Web Token (JWT) for users needing access to the Coldline storage buckets.
- D Create a lifecycle management policy to set the storage class to Coldline for objects older than 14 days.
- E Create a lifecycle management policy to set the storage class to Nearline for objects older than 14 days.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi mô tả một ứng dụng web mới phát triển để chuyển dữ liệu log hàng ngày vào Cloud Storage bucket (Google Cloud Storage - GCS).
✅ Yêu cầu sử dụng:
- Người dùng xác thực xem log từ 2 tuần trước để kiểm tra sự kiện quan trọng (truy cập thường xuyên).
- Sau đó, log chỉ được xem một lần mỗi năm bởi kiểm toán viên bên ngoài.
- Dữ liệu phải lưu trữ ít nhất 7 năm.
- Đề xuất giải pháp lưu trữ tối ưu chi phí và đáp ứng yêu cầu (chọn hai lựa chọn).
🛠️ Mục tiêu chính: Kết hợp chính sách giữ dữ liệu lâu dài (retention) và tự động chuyển lớp lưu trữ (storage class) để giảm chi phí, vì dữ liệu sau 14 ngày ít được truy cập nhưng cần lưu lâu dài. Sử dụng kiến thức GCS cập nhật đến 2026 (Bucket Lock hỗ trợ retention policy immutable, storage classes: Standard → Coldline cho annual access).
📘 Tài liệu tham khảo:
- Bucket Lock (GCS retention policy).
- Lifecycle Management (tự động chuyển storage class).
- Storage Classes (Coldline: tối ưu cho <1 lần/năm).
✅ Đáp án đúng (Chọn hai)
Hai lựa chọn đúng là:
-
Use the Bucket Lock feature to set the retention policy on the data.
- Lý do: Bucket Lock cho phép đặt retention period tối thiểu 7 năm trên bucket/object, ngăn xóa/sửa dữ liệu (immutable). Đáp ứng yêu cầu lưu trữ ≥7 năm, an toàn cho kiểm toán.
-
Create a lifecycle management policy to set the storage class to Coldline for objects older than 14 days.
- Lý do: Lifecycle policy tự động chuyển object >14 ngày sang Coldline (rẻ nhất cho truy cập hàng năm, phí truy xuất cao nhưng lưu trữ thấp). Tối ưu chi phí sau giai đoạn xem thường xuyên (2 tuần).
📋 Giải thích tất cả các phương án (Đúng/Sai)
-
✅ Use the Bucket Lock feature to set the retention policy on the data.
Đúng: Bucket Lock (tính năng GCS từ 2020, cập nhật 2026 vẫn hỗ trợ) khóa dữ liệu với retention policy ≥7 năm, đảm bảo không xóa trước hạn. Hoàn hảo cho yêu cầu lưu trữ lâu dài và kiểm toán, không ảnh hưởng chi phí lưu trữ. -
❌ Run a scheduled job to set the storage class to Coldline for objects older than 14 days.
Sai: Chạy job định kỳ (như Cloud Functions/Cloud Scheduler) là cách thủ công, tốn kém vận hành, dễ lỗi và không scale. Lifecycle management tự động hơn, rẻ hơn – không cần job riêng. -
❌ Create a JSON Web Token (JWT) for users needing access to the Coldline storage buckets.
Sai: JWT dùng cho xác thực API (như IAM), nhưng không liên quan đến yêu cầu lưu trữ/chi phí. Truy cập Coldline dùng IAM policies hoặc signed URLs; JWT không giải quyết retention hay storage class. -
✅ Create a lifecycle management policy to set the storage class to Coldline for objects older than 14 days.
Đúng: Lifecycle rule tự động (không tốn phí) chuyển sang Coldline sau 14 ngày, phù hợp dữ liệu truy cập hàng năm (Coldline: ~$0.004/GB/tháng, phí retrieval hợp lý). Giảm chi phí so với Standard/Nearline. -
❌ Create a lifecycle management policy to set the storage class to Nearline for objects older than 14 days.
Sai: Nearline tối ưu cho truy cập hàng tháng (phí retrieval cao hơn Coldline), không phù hợp dữ liệu chỉ xem hàng năm. Coldline rẻ hơn (~1/4 giá Nearline cho lưu trữ lâu dài).
- A Create a new Cloud Function that is triggered when Cloud Audit Logs detects the cloudfunctions.functions.sourceCodeSet operation in the original Cloud Function. Send mock requests to the new function to evaluate the functionality.
- B Make a copy of the Cloud Function, and rewrite the code to be HTTP-triggered. Edit and test the new version by triggering the HTTP endpoint. Send mock requests to the new function to evaluate the functionality.
- C Install the Functions Frameworks library, and configure the Cloud Function on localhost. Make a copy of the function, and make edits to the new version. Test the new version using curl.
- D Make a copy of the Cloud Function in the Google Cloud console. Use the Cloud console's in-line editor to make source code changes to the new function. Modify your web application to call the new function, and test the new version in production
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 phát triển và kiểm thử nhanh chóng một Cloud Function được kích hoạt bởi sự kiện Cloud Storage (như upload file mới), đồng thời tuân thủ các best practices được Google khuyến nghị.
- Bối cảnh: Đội ngũ đang xây dựng Cloud Function trên Google Cloud Platform (GCP). Cloud Function là dịch vụ serverless cho phép chạy code mà không quản lý server. Trigger từ Cloud Storage events nghĩa là function sẽ tự động chạy khi có thay đổi (ví dụ: object created/finalized).
- Mục tiêu: Tăng tốc testing và development (kiểm thử cục bộ, chỉnh sửa nhanh) mà không ảnh hưởng production, tránh deploy liên tục lên cloud (tốn kém, chậm).
- Best practices của Google: Khuyến khích local emulation (chạy function trên máy local) để test nhanh, sử dụng Functions Framework – thư viện chính thức hỗ trợ chạy Cloud Functions như server local, mô phỏng trigger events. Điều này giúp edit code realtime, test bằng curl/Postman mà không cần deploy.
📘 Tài liệu tham khảo:
- Google Cloud Functions: Local Development (cập nhật 2024-2026, khuyến nghị Functions Framework v4+).
- Functions Framework Documentation (hỗ trợ Node.js, Python, Go, Java, .NET, PHP).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Install the Functions Frameworks library, and configure the Cloud Function on localhost. Make a copy of the function, and make edits to the new version. Test the new version using curl.
Lý do:
- 🛠️ Tuân thủ best practices: Functions Framework là công cụ chính thức của Google để emulate Cloud Functions locally (chạy trên localhost:8080). Hỗ trợ mô phỏng trigger từ Cloud Storage events bằng cách gửi HTTP requests giả lập.
- 🚀 Tăng tốc dev/test: Copy function code, edit local, test ngay bằng
curl(hoặc tools như Postman). Không deploy, tiết kiệm chi phí, feedback loop nhanh (seconds thay vì minutes). - 🔄 An toàn: Không ảnh hưởng production; hỗ trợ tất cả runtime (Node, Python,...). Phiên bản mới nhất (2026) tích hợp emulator đầy đủ cho Pub/Sub, Storage events.
- So với các option khác, đây là cách Google-recommended duy nhất cho local dev.
📋 Giải thích tất cả các phương án
-
Phương án 1 (❌ SAI):
Create a new Cloud Function that is triggered when Cloud Audit Logs detects the cloudfunctions.functions.sourceCodeSet operation in the original Cloud Function. Send mock requests to the new function to evaluate the functionality.
Giải thích sai: Phức tạp, không hiệu quả. Sử dụng Cloud Audit Logs để detect thay đổi source code (operationsourceCodeSet) rồi trigger function mới là over-engineering, tốn kém (Audit Logs lưu trữ lâu), chậm (delay logs). Không accelerate dev, vi phạm best practices (không local). Google không recommend cách này cho testing. -
Phương án 2 (❌ SAI):
Make a copy of the Cloud Function, and rewrite the code to be HTTP-triggered. Edit and test the new version by triggering the HTTP endpoint. Send mock requests to the new function to evaluate the functionality.
Giải thích sai: Yêu cầu rewrite code từ event-triggered (Storage) sang HTTP-triggered, mất thời gian và dễ lỗi logic (event payload khác HTTP). Phải deploy copy lên cloud để test endpoint → chậm, tốn phí invocation. Không phải best practice; Google ưu tiên giữ nguyên trigger và emulate local thay vì refactor. -
Phương án 3 (✅ ĐÚNG):
Install the Functions Frameworks library, and configure the Cloud Function on localhost. Make a copy of the function, and make edits to the new version. Test the new version using curl.
Giải thích đúng: Như đã nêu ở phần đáp án. Local setup đơn giản:pip install functions-framework(Python) hoặc tương đương, chạyfunctions-framework --target=your_function --port=8080. Copy code, edit, test Storage event bằng curl với JSON payload giả lập. Hỗ trợ đầy đủ triggers, nhanh nhất cho dev cycle. Best practice chính thức từ Google (2026). -
Phương án 4 (❌ SAI):
Make a copy of the Cloud Function in the Google Cloud console. Use the Cloud console's in-line editor to make source code changes to the new function. Modify your web application to call the new function, and test the new version in production.
Giải thích sai: Sử dụng inline editor trong Console deploy trực tiếp copy function → test trên production-like env, rủi ro cao (lỗi ảnh hưởng quota/chi phí). Phải modify web app để gọi function mới → phức tạp, không accelerate dev. Google khuyên tránh test production; dùng local hoặc emulator thay vì console editor cho dev nhanh.
🧪 Lời khuyên thực hành: Để test Storage event local, dùng lệnh như curl -X POST "http://localhost:8080" -H "Ce-Type: google.cloud.storage.object.v1.finalized" -d '{"bucket":"test-bucket","name":"file.txt"}'. Deploy chỉ khi local OK!
- A Cloud Build, Cloud Storage, and Binary Authorization
- B Google Cloud Deploy, Cloud Storage, and Google Cloud Armor
- C Google Cloud Deploy, Artifact Registry, and Google Cloud Armor
- D Cloud Build, Artifact Registry, and Binary Authorization
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 thiết lập build pipeline cho một ứng dụng chạy trên Google Kubernetes Engine (GKE). Yêu cầu chính là tăng cường bảo mật bằng cách chỉ cho phép deploy các container image được sản xuất từ pipeline chính thức vào cluster GKE.
- Mục tiêu cốt lõi: Xây dựng image an toàn (build), lưu trữ image đáng tin cậy (registry), và kiểm soát nghiêm ngặt việc deploy (authorization) để ngăn chặn image độc hại từ nguồn ngoài.
- Bối cảnh bảo mật: Tránh rủi ro supply chain attack bằng cách sử dụng các dịch vụ Google Cloud tích hợp với GKE, đảm bảo image phải được ký số (signed) hoặc attest (xác thực) trước khi deploy.
- Phiên bản cập nhật (đến 2026): Theo tài liệu Google Cloud mới nhất (Artifact Registry v2, Binary Authorization với Attestation, Cloud Build với in-cluster builds), đây là best practice cho secure CI/CD pipeline trên GKE Autopilot/Standard.
📘 Tài liệu tham khảo:
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Cloud Build, Artifact Registry, and Binary Authorization
Lý do chi tiết 🛠️:
- Cloud Build ✅: Dịch vụ CI/CD tự động build Docker/OCI images từ source code, hỗ trợ secret management và integration với GKE.
- Artifact Registry ✅: Container image registry native của Google Cloud (thay thế Container Registry cũ), hỗ trợ vulnerability scanning (Container Analysis) và signing images.
- Binary Authorization ✅: Policy engine cho GKE, chỉ cho phép deploy image nếu chúng được ký bởi key đáng tin cậy (PKS - Public Key Signature) hoặc có attestation từ pipeline (như Cloud Build). Hoàn hảo để enforce "only images from our pipeline".
- Kết hợp lý tưởng: Cloud Build → push signed image lên Artifact Registry → Binary Authorization kiểm tra trước khi GKE pull/deploy. Đảm bảo zero-trust security cho GKE cluster.
❌ Phân tích tất cả các phương án (đúng/sai)
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:
-
[SAI] Cloud Build, Cloud Storage, and Binary Authorization
❌ Sai vì: Cloud Storage chỉ lưu trữ object blob thông thường (như file ZIP), không phải container registry hỗ trợ OCI/Docker images với scanning/security features. Artifact Registry mới là lựa chọn đúng để lưu trữ và attest image. Sử dụng Cloud Storage sẽ thiếu vulnerability scanning và integration mượt mà với Binary Authorization, dẫn đến lỗ hổng bảo mật. -
[SAI] Google Cloud Deploy, Cloud Storage, and Google Cloud Armor
❌ Sai vì: Google Cloud Deploy dùng cho deploy continuous (release pipeline), không phải build image. Cloud Storage không phù hợp lưu image (như trên). Google Cloud Armor là WAF (Web Application Firewall) bảo vệ L7 traffic, không liên quan kiểm soát container image deploy vào GKE. Kết hợp này thiếu build và authorization thực sự. -
[SAI] Google Cloud Deploy, Artifact Registry, and Google Cloud Armor
❌ Sai vì: Google Cloud Deploy tốt cho deploy nhưng không thay thế Cloud Build (thiếu bước build pipeline). Artifact Registry đúng nhưng Google Cloud Armor lại chỉ bảo vệ web app traffic, không kiểm soát image attestation/signing ở layer container runtime như Binary Authorization. Không đảm bảo "only pipeline images". -
[ĐÚNG] Cloud Build, Artifact Registry, and Binary Authorization
✅ Đúng hoàn toàn (như giải thích ở phần trên). Đây là stack bảo mật chuẩn cho GKE CI/CD, được khuyến nghị bởi Google cho production workloads với policy enforcement.
🔒 Lời khuyên thực tế: Để implement, kích hoạt Binary Authorization trên GKE cluster qua gcloud container clusters update --binary-authorization enabled, và dùng Cloud Build trigger để auto-sign image với cosign hoặc KMS. Kiểm tra demo tại GKE Security Best Practices.
- A Create a Cloud Function that consumes the Cloud Monitoring API. Use Cloud Scheduler to trigger the Cloud Function daily and alert you if the number of errors is above the defined threshold.
- B Navigate to the Cloud Run page in the Google Cloud console, and select the service from the services list. Use the Metrics tab to visualize the number of errors for that revision, and refresh the page daily.
- C Create an alerting policy in Cloud Monitoring that alerts you if the number of errors is above the defined threshold.
- D Create a Cloud Function that consumes the Cloud Monitoring API. Use Cloud Composer to trigger the Cloud Function daily and alert you if the number of errors is above the defined threshold.
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 tình huống hỗ trợ một ứng dụng kinh doanh quan trọng (business-critical) đang chạy trên Cloud Run ở môi trường production. Ứng dụng đang gặp lỗi HTTP 500 (lỗi server nội bộ), dẫn đến ảnh hưởng đến khả năng sử dụng. Yêu cầu là được cảnh báo (alert) khi số lượng lỗi vượt quá 15% tổng số request trong một khoảng thời gian cụ thể (time window).
📌 Mục tiêu chính: Thiết lập hệ thống giám sát tự động, thời gian thực để phát hiện và thông báo kịp thời, tránh phải kiểm tra thủ công. Cloud Run hỗ trợ tích hợp sâu với Cloud Monitoring (trước đây là Stackdriver), nơi có các metric sẵn như cloud_run_revision/request_count (tổng request) và cloud_run_revision/http_server_error_count (lỗi HTTP 500+). Chúng ta có thể tính tỷ lệ lỗi bằng cách sử dụng MQL (Monitoring Query Language) hoặc các điều kiện so sánh để thiết lập alerting policy chính xác với ngưỡng 15%.
🛠️ Ngữ cảnh cập nhật 2026: Theo tài liệu Google Cloud mới nhất (Cloud Run v2 và Monitoring v3), Cloud Monitoring hỗ trợ alerting policies linh hoạt dựa trên tỷ lệ lỗi (error rate), với thời gian window tùy chỉnh (ví dụ: 5 phút, 1 giờ), và tích hợp notification qua email, Slack, PagerDuty. Không cần code thủ công vì có giao diện console và Terraform/CLI hỗ trợ.
📘 Tài liệu tham khảo:
- Cloud Run Metrics (Google Cloud Docs).
- Alerting Policies in Cloud Monitoring (cập nhật 2025 với AI Anomaly Detection).
- Cloud Run Observability (metrics error rate trực tiếp).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Create an alerting policy in Cloud Monitoring that alerts you if the number of errors is above the defined threshold.
Lý do: Phương án này sử dụng tính năng cốt lõi của Cloud Monitoring để tạo alerting policy tự động, thời gian thực. Bạn có thể định nghĩa điều kiện như (http_server_error_count / request_count) > 0.15 trong một time window cụ thể (ví dụ: 10 phút rolling), và thiết lập notification ngay lập tức. Đây là cách tối ưu, không cần code thêm, scalable và phù hợp với best practice cho production apps trên Cloud Run. ✅ Hoàn hảo cho monitoring liên tục mà không phụ thuộc lịch trình thủ công!
📋 Giải thích tất cả các phương án (đúng/sai)
-
❌ Phương án SAI: Create a Cloud Function that consumes the Cloud Monitoring API. Use Cloud Scheduler to trigger the Cloud Function daily and alert you if the number of errors is above the defined threshold.
Giải thích: Phương án này dùng Cloud Function + Cloud Scheduler chạy hàng ngày (daily), chỉ kiểm tra batch thay vì thời gian thực. Không đáp ứng yêu cầu "within a specific time window" (cần real-time), tốn kém (chi phí invoke Function), và phức tạp không cần thiết vì Cloud Monitoring đã có alerting built-in. ❌ Không hiệu quả cho production critical app! -
❌ Phương án SAI: Navigate to the Cloud Run page in the Google Cloud console, and select the service from the services list. Use the Metrics tab to visualize the number of errors for that revision, and refresh the page daily.
Giải thích: Đây chỉ là kiểm tra thủ công qua console Metrics tab, phải refresh daily – không tự động alert, dễ bỏ lỡ lỗi (không real-time), và không scale cho team lớn. Cloud Run Metrics chỉ visualize, không thay thế alerting policy. ❌ Thủ công, không chuyên nghiệp cho business-critical! -
✅ Phương án ĐÚNG: Create an alerting policy in Cloud Monitoring that alerts you if the number of errors is above the defined threshold.
Giải thích: Như đã nêu ở phần đáp án đúng, đây là giải pháp tự động, chính xác với ngưỡng 15% lỗi (dùng ratio metric), hỗ trợ time window tùy chỉnh, và tích hợp notification đa kênh. Built-in cho Cloud Run, zero code! ✅ Best practice theo Google Cloud! -
❌ Phương án SAI: Create a Cloud Function that consumes the Cloud Monitoring API. Use Cloud Composer to trigger the Cloud Function daily and alert you if the number of errors is above the defined threshold.
Giải thích: Sử dụng Cloud Composer (Airflow-based orchestration) để trigger daily quá phức tạp, đắt đỏ (chi phí Composer cao), và vẫn chỉ batch check thay vì real-time. Không tận dụng alerting native của Monitoring. ❌ Overkill và không phù hợp!
🛠️ Khuyến nghị bổ sung: Sau khi tạo alerting policy, kết hợp với Error Reporting và SLO/SLI để monitoring toàn diện. Test policy bằng cách simulate lỗi 500 trên Cloud Run! 🚀

- A App Engine
- B Cloud Endpoints
- C Identity-Aware Proxy
- D GKE Ingress for HTTP(S) Load Balancing
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi yêu cầu xây dựng một public API (API công khai) có khả năng xác thực (authenticates) người gọi API, thực thi quota (enforces quotas) để giới hạn số lượng request, và báo cáo metrics (reports metrics) để theo dõi hiệu suất/sử dụng. Kiến trúc được minh họa qua hình ảnh sơ đồ (architecture diagram) như sau:
-
Mô tả hình ảnh chi tiết:
- Một client (biểu tượng laptop 🖥️) gửi request.
- Request đi qua Cloud Load Balancing (biểu tượng đám mây với các node cân bằng tải).
- Sau đó là một ô trống (empty white box) – đây chính là vị trí cần điền tool phù hợp để hoàn thiện kiến trúc.
- Cuối cùng là PHP Application (ứng dụng PHP với biểu tượng code).
Sơ đồ:
Client → Cloud Load Balancing → [Ô TRỐNG] → PHP Application.
🛠️ Mục tiêu: Tool điền vào ô trống phải tích hợp mượt mà với Cloud Load Balancing, xử lý auth/quota/metrics cho public API trước khi request đến backend PHP.
Câu hỏi tập trung vào Google Cloud Platform (GCP) (không phải AWS như đề cập nhầm), sử dụng kiến thức cập nhật đến năm 2026: Cloud Endpoints vẫn là giải pháp chuẩn cho API management trên GCP, hỗ trợ OpenAPI/Swagger, tích hợp ESPv2 (Extensible Service Proxy v2) với Cloud Load Balancing cho serverless/hybrid workloads.
📘 Tài liệu tham khảo:
- Cloud Endpoints Overview (GCP Docs, cập nhật 2024+).
- Architectures for APIs on GCP (GCP Architecture Center).
- Cloud Load Balancing with Endpoints (Hướng dẫn tích hợp mới nhất).
✅ Đáp án đúng: Cloud Endpoints
Lý do lựa chọn 🏆:
Cloud Endpoints là API Gateway chuyên dụng của GCP, được thiết kế chính xác để xác thực (JWT, API keys, OAuth), thực thi quota/throttling (giới hạn request theo user/IP/key), và báo cáo metrics (tích hợp Cloud Monitoring/Logging tự động). Nó đặt ESPv2 proxy vào ô trống, proxy request từ Cloud Load Balancing đến PHP app (hỗ trợ backend như App Engine, GKE, Compute Engine).
✅ Hoàn hảo cho sơ đồ: Tích hợp trực tiếp với HTTP(S) Load Balancer, hỗ trợ public API scalable đến 2026. Không cần code thêm, chỉ config OpenAPI spec.
📋 Giải thích tất cả các phương án (đúng/sai)
-
Cloud Endpoints ✅ ĐÚNG
Như giải thích trên: Cung cấp đầy đủ auth/quota/metrics cho public API, proxy hoàn hảo giữa Load Balancer và PHP app. Lý tưởng cho kiến trúc này với ESPv2 (cập nhật 2024+ hỗ trợ gRPC/REST). -
App Engine ❌ SAI
App Engine là PaaS để deploy/run app (như PHP), không phải gateway proxy cho auth/quota/metrics. Nó deploy toàn bộ app, không điền vào ô trống giữa Load Balancer và PHP (sẽ duplicate backend). Không phù hợp public API management. -
Identity-Aware Proxy (IAP) ❌ SAI
IAP dùng cho zero-trust access nội bộ (context-aware auth với Google identities), không hỗ trợ public API (yêu cầu user Google login). Không enforce quota/metrics tự động, và không proxy cho PHP public app. Phù hợp private/internal hơn. -
GKE Ingress for HTTP(S) Load Balancing ❌ SAI
Đây là Ingress controller cho Kubernetes (GKE), dùng route traffic vào pods, hỗ trợ basic TLS/L7 rules nhưng không có auth/quota/metrics built-in (cần add-on như Istio). Không điền trực tiếp ô trống (yêu cầu GKE cluster), và backend là PHP thuần (không phải GKE). Không chuyên public API.
- A Update your code to process a received SIGTERM signal to gracefully disconnect from the database.
- B Configure a PodDisruptionBudget to prevent the Pod from being forcefully shut down.
- C Increase the terminationGracePeriodSeconds for your application.
- D Configure a PreStop hook to shut down your application.
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 vấn đề graceful shutdown (tắt ứng dụng một cách nhẹ nhàng) trong Google Kubernetes Engine (GKE) – một dịch vụ quản lý Kubernetes của Google Cloud.
- Tình huống: Trong quá trình cập nhật Deployment (ví dụ: rolling update), ứng dụng bị forcefully shut down (tắt đột ngột), dẫn đến không đóng kết nối cơ sở dữ liệu (database connection) trước khi bị terminate. Điều này có thể gây ra các vấn đề như kết nối "treo" (leaked connections), dữ liệu không nhất quán hoặc tải nặng lên DB.
- Mục tiêu: Cập nhật ứng dụng để đảm bảo nó hoàn tất graceful shutdown, nghĩa là xử lý các bước dọn dẹp (cleanup) như đóng kết nối DB một cách an toàn trước khi Pod bị xóa.
- Ngữ cảnh Kubernetes/GKE: Khi Pod bị terminate (do Deployment update, scaling, node drain...), kubelet gửi tín hiệu SIGTERM đến process chính của container. Ứng dụng cần xử lý tín hiệu này để thực hiện cleanup. Nếu không phản hồi sau
terminationGracePeriodSeconds(mặc định 30 giây), kubelet sẽ gửi SIGKILL để buộc tắt.
📘 Tài liệu tham khảo:
- Kubernetes Documentation: Pod Lifecycle - Graceful Shutdown (cập nhật đến Kubernetes 1.31, 2024; không thay đổi lớn đến 2026).
- GKE Docs: Graceful shutdown in GKE (phiên bản mới nhất 2026).
✅ Đáp án đúng
Update your code to process a received SIGTERM signal to gracefully disconnect from the database.
Lý do chọn đáp án này 🛠️:
Đây là cách trực tiếp và chuẩn best practice để thực hiện graceful shutdown. Trong Kubernetes/GKE, khi Pod terminate, process nhận SIGTERM đầu tiên. Bằng cách cập nhật code ứng dụng để xử lý (handle) SIGTERM (sử dụng signal handler trong ngôn ngữ như Node.js process.on('SIGTERM'), Java Runtime.addShutdownHook(), Python signal.signal()...), ứng dụng có thể đóng kết nối DB một cách an toàn trước khi thoát. Điều này đảm bảo hoàn tất cleanup ngay cả khi thời gian chờ ngắn, tránh tình trạng bị SIGKILL cắt ngang. Phương pháp này linh hoạt, không phụ thuộc config bên ngoài và hoạt động tốt trong mọi scenario terminate.
❌ Giải thích tất cả các phương án
-
Update your code to process a received SIGTERM signal to gracefully disconnect from the database.
✅ Đúng (như đã giải thích ở trên). Đây là giải pháp cốt lõi, khuyến nghị chính thức từ Kubernetes để ứng dụng tự xử lý shutdown logic. Không chỉ đóng DB mà còn flush buffer, save state... -
Configure a PodDisruptionBudget to prevent the Pod from being forcefully shut down.
❌ Sai. PodDisruptionBudget (PDB) chỉ giới hạn số Pod bị evict đồng thời trong voluntary disruptions (như node drain, scaling), không ngăn chặn terminate trong Deployment update (involuntary hoặc rolling update). PDB không xử lý graceful shutdown mà chỉ kiểm soát tốc độ disruption, không giải quyết vấn đề đóng DB khi bị terminate. -
Increase the terminationGracePeriodSeconds for your application.
❌ Sai. Việc tăng giá trị này (trong Pod spec, ví dụ:terminationGracePeriodSeconds: 60) chỉ kéo dài thời gian chờ giữa SIGTERM và SIGKILL (mặc định 30s). Nó không đảm bảo ứng dụng xử lý SIGTERM để đóng DB – nếu code không handle signal, tăng thời gian vẫn dẫn đến shutdown đột ngột khi SIGKILL kích hoạt. Đây chỉ là giải pháp tạm thời, không giải quyết gốc rễ. -
Configure a PreStop hook to shut down your application.
❌ Sai. PreStop hook (lifecycle hook trong Pod spec) chạy trước SIGTERM (parallel với SIGTERM ở một số trường hợp), dùng cho cleanup nhanh như kill sidecar processes. Tuy nhiên, nó không thay thế việc handle SIGTERM trong code chính, dễ timeout nếu hook chậm, và không trực tiếp "update your application" (hook là config YAML, không phải code). PreStop phù hợp bổ sung, nhưng không phải giải pháp chính cho graceful disconnect DB từ app logic.
💡 Lời khuyên thực hành: Kết hợp handle SIGTERM + PreStop hook + PDB cho production. Test bằng kubectl delete pod --grace-period=0 để simulate. 🚀
A few months after go-live, you notice that Cloud Run instances are terminated with HTTP 500: Container instances are exceeding memory limits errors during busy times. This error coincides with spikes in the number of Datastore entity reads. You need to prevent Cloud Run from crashing and decrease the number of Datastore entity reads. You want to use a solution that optimizes system performance. What should you do?
- A Modify the query that returns the product list using integer offsets.
- B Modify the query that returns the product list using limits.
- C Modify the Cloud Run configuration to increase the memory limits.
- D Modify the query that returns the product list using cursors.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi mô tả một tình huống thực tế trong hệ thống retail chạy trên Google Cloud Platform (GCP), cụ thể là Cloud Run (dịch vụ serverless cho container) kết hợp với Firestore in Datastore mode (chế độ tương thích Datastore của Firestore để lưu trữ dữ liệu sản phẩm).
-
Yêu cầu ban đầu (MVP): Hiển thị danh sách tất cả sản phẩm (all available products) khi người dùng truy cập web UI, cho phép duyệt qua toàn bộ. Điều này được triển khai bằng cách query trực tiếp toàn bộ entities từ Firestore, dẫn đến việc đọc toàn bộ dữ liệu mỗi lần.
-
Vấn đề xảy ra sau go-live:
- Trong giờ cao điểm (busy times), Cloud Run instances bị terminate với lỗi HTTP 500: Container instances are exceeding memory limits.
- Lỗi này trùng khớp với spikes in the number of Datastore entity reads (tăng đột biến số lượng đọc entities từ Datastore).
- Nguyên nhân gốc rễ: Query lấy toàn bộ list sản phẩm gây memory bùng nổ (vì load tất cả data vào memory) và tăng reads không cần thiết (mỗi request scan/index toàn bộ collection).
-
Mục tiêu giải quyết:
- ✅ Ngăn Cloud Run crash (tránh exceed memory).
- ✅ Giảm số lượng Datastore entity reads.
- ✅ Tối ưu performance tổng thể (optimize system performance), ưu tiên giải pháp bền vững thay vì tạm thời.
🛠️ Vấn đề cốt lõi: Không dùng pagination đúng cách trong Firestore/Datastore. Query full list gây fan-out reads lớn, đặc biệt khi collection products lớn (hàng nghìn entities), dẫn đến memory overflow trên Cloud Run (mặc định memory limit ~256-512MiB tùy config).
📘 Kiến thức cập nhật (đến 2026): Theo tài liệu Firestore mới nhất (Firestore v1 API & Datastore mode), pagination hiệu quả dùng cursors để resume query từ vị trí cuối cùng, tránh re-scan index từ đầu. Không khuyến khích integer offsets/limits thuần vì kém hiệu quả với composite indexes lớn. Cloud Run (phiên bản 2025+) tự động scale nhưng vẫn enforce memory limits nghiêm ngặt.
Nguồn tham khảo:
- Firestore Query Cursors (chính thức GCP).
- Datastore Pagination.
- Cloud Run Memory Limits.
✅ Đáp án đúng và lý do lựa chọn
Modify the query that returns the product list using cursors.
Lý do:
- 🛠️ Cursors (startAt/endAt với cursor token) là phương pháp pagination chuẩn và tối ưu nhất cho Firestore/Datastore. Nó cho phép query chỉ một trang dữ liệu nhỏ (ví dụ: 20-50 products/page), resume chính xác từ vị trí cuối mà KHÔNG scan lại toàn bộ index từ đầu.
- ✅ Giảm reads: Mỗi request chỉ đọc delta data cần thiết (ví dụ: giảm từ 10k reads xuống 50 reads/page), tránh spikes.
- ✅ Giảm memory: Client-side chỉ load trang hiện tại, Cloud Run không cần buffer full list → tránh exceed memory limits.
- ✅ Tối ưu performance: Hỗ trợ infinite scroll/browse mượt mà, scale tốt với traffic cao. Cursor opaque (base64-encoded), an toàn và efficient (không phụ thuộc index size).
- So với các cách khác, đây là best practice từ GCP, không chỉ fix triệu chứng mà giải quyết gốc rễ.
❌ Giải thích tất cả các phương án (đúng và sai)
-
Modify the query that returns the product list using integer offsets.
❌ Sai: Integer offsets (ví dụ: OFFSET 100) KHÔNG hiệu quả trong Firestore/Datastore vì mỗi trang phải scan từ đầu index (skip N records → reads = total + offset). Gây tăng reads theo cấp số nhân khi offset lớn (ví dụ: trang 100 cần ~10k reads), làm tệ hơn spikes và memory overflow. GCP không khuyến khích offsets cho large collections (deprecated pattern từ Datastore v1). -
Modify the query that returns the product list using limits.
❌ Sai: LIMIT chỉ giới hạn số lượng kết quả (ví dụ: LIMIT 50), nhưng vẫn scan toàn bộ index nếu không kết hợp pagination đúng (như cursors). Không giải quyết full scan → reads spikes vẫn xảy ra, memory vẫn cao nếu kết quả lớn. Chỉ là partial fix, không optimize browse "through all products" (vẫn load full nếu không paginate liên tục). -
Modify the Cloud Run configuration to increase the memory limits.
❌ Sai: Tăng memory (qua --memory flag, ví dụ: 1GiB) chỉ là workaround tạm thời, KHÔNG giảm Datastore reads (vẫn spikes → cost cao hơn). Cloud Run max memory 32GiB (2026), nhưng vi phạm nguyên tắc serverless (over-provisioning dẫn bill cao, không scale bền vững). Không optimize performance, chỉ delay crash. -
Modify the query that returns the product list using cursors.
✅ Đúng: Như giải thích ở trên – giải pháp gốc rễ, giảm reads/memory tối đa, phù hợp best practice GCP cho UI list/browse lớn. Hỗ trợ client-side pagination (pass cursor qua URL/query param).
•There is no downtime when new container images are deployed.
•New production releases are tested and verified using a subset of production users.
What should you do?
-
A
1. Configure your CI/CD pipeline to update the Deployment manifest file by replacing the container version with the latest version.
2. Recreate the Pods in your cluster by applying the Deployment manifest file.
3. Validate the application's performance by comparing its functionality with the previous release version, and roll back if an issue arises. -
B
1. Create a second namespace on GKE for the new release version.
2. Create a Deployment configuration for the second namespace with the desired number of Pods.
3. Deploy new container versions in the second namespace.
4. Update the Ingress configuration to route traffic to the namespace with the new container versions. -
C
1. Install the Anthos Service Mesh on your GKE cluster.
2. Create two Deployments on the GKE cluster, and label them with different version names.
3. Implement an Istio routing rule to send a small percentage of traffic to the Deployment that references the new version of the application. -
D
1. Implement a rolling update pattern by replacing the Pods gradually with the new release version.
2. Validate the application's performance for the new subset of users during the rollout, and roll back if an issue arises.
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 triển khai một ứng dụng microservices hướng ra internet (internet-facing) trên Google Kubernetes Engine (GKE). Mục tiêu chính là validate các tính năng mới bằng phương pháp A/B testing, với hai yêu cầu cốt lõi:
- Không có downtime (thời gian ngừng dịch vụ) khi triển khai các container image mới.
- Test và verify các bản release production mới bằng một subset (phần nhỏ) của người dùng production thực tế.
📘 Phân tích sâu hơn:
- A/B testing ở đây ngụ ý cần chạy song song hai phiên bản (old và new), phân bổ traffic một phần nhỏ đến phiên bản mới để test với subset users production mà không ảnh hưởng toàn bộ hệ thống.
- Đây là kịch bản zero-downtime deployment với traffic splitting/canary release trong môi trường production trên GKE.
- Kiến thức cập nhật đến 2026: GKE (phiên bản mới nhất như GKE 1.29+ và Autopilot mode) hỗ trợ các chiến lược deployment nâng cao qua Anthos Service Mesh (ASM - trước là Istio) cho traffic management tinh vi, hoặc Ingress với weighted backends cơ bản. Không liên quan AWS như đề cập (có thể nhầm lẫn), mà thuần Google Cloud.
🟢 Đáp án đúng
Phương án 3 (Install the Anthos Service Mesh on your GKE cluster...):
- ✅ Lý do lựa chọn: Phương án này hoàn hảo khớp yêu cầu A/B testing với small percentage of traffic (phần trăm nhỏ traffic) đến phiên bản mới, đảm bảo test subset production users mà không downtime (hai Deployments chạy song song). Anthos Service Mesh (ASM) cho phép Istio VirtualService routing rules dựa trên headers, weights hoặc user attributes – chuẩn cho microservices trên GKE. Cập nhật 2026: ASM 1.20+ tích hợp native với GKE Enterprise, hỗ trợ mTLS, observability qua Telemetry.
- Tại sao không phải các phương án khác? Chúng không hỗ trợ traffic splitting rõ ràng cho subset users (xem giải thích chi tiết bên dưới).
📚 Tài liệu tham khảo:
- GKE Traffic Management with ASM (Google Cloud Docs, updated 2025).
- Anthos Service Mesh Canary Deployments – ví dụ routing rule 90/10 split.
- Google Cloud Professional Cloud Developer Exam Guide (2024-2026 editions).
🛠️ Giải thích tất cả các phương án
Dưới đây là phân tích từng phương á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 dựa trên yêu cầu (zero-downtime + subset production users cho A/B).
-
Phương án 1:
- Configure your CI/CD pipeline to update the Deployment manifest file by replacing the container version with the latest version.
- Recreate the Pods in your cluster by applying the Deployment manifest file.
- Validate the application's performance by comparing its functionality with the previous release version, and roll back if an issue arises.
❌ Sai: Phương án này gây downtime khi recreate Pods toàn bộ (không rolling update), không hỗ trợ A/B testing song song hay subset users (chỉ so sánh sau khi thay thế). Không khớp zero-downtime và production subset testing.
-
Phương án 2:
- Create a second namespace on GKE for the new release version.
- Create a Deployment configuration for the second namespace with the desired number of Pods.
- Deploy new container versions in the second namespace.
- Update the Ingress configuration to route traffic to the namespace with the new container versions.
❌ Sai: Đây là blue-green deployment (deploy parallel namespace, switch traffic), đảm bảo no downtime khi switch nhưng không hỗ trợ subset users rõ ràng – "route traffic to the namespace with the new" ngụ ý chuyển toàn bộ traffic sang new namespace, không phải phần nhỏ (A/B/canary). GKE Ingress hỗ trợ weighted backends cơ bản nhưng phương án không đề cập split %, chỉ update to new → rủi ro test toàn bộ users trước verify.
-
Phương án 3:
- Install the Anthos Service Mesh on your GKE cluster.
- Create two Deployments on the GKE cluster, and label them with different version names.
- Implement an Istio routing rule to send a small percentage of traffic to the Deployment that references the new version of the application.
✅ Đúng: Hoàn toàn khớp – hai Deployments song song (labels v1/v2), Istio rule split small % traffic trực tiếp đến new version → test subset production users chính xác, zero-downtime (traffic gradual shift). Lý tưởng cho microservices, hỗ trợ A/B dựa %/headers/users.
-
Phương án 4:
- Implement a rolling update pattern by replacing the Pods gradually with the new release version.
- Validate the application's performance for the new subset of users during the rollout, and roll back if an issue arises.
❌ Sai: Rolling update (maxSurge/maxUnavailable) gradual thay Pods nhưng không phải A/B thực thụ (không chạy song song versions rõ ràng, chỉ replace dần). "Subset users" mơ hồ (phụ thuộc readiness probes), không linh hoạt split traffic như A/B yêu cầu. Rủi ro partial failure ảnh hưởng production nếu issue sớm.
💡 Lưu ý cuối: Nếu dùng GKE Autopilot (2026), ưu tiên ASM cho traffic management tự động. Để thực hành A/B, dùng kubectl apply với Istio manifests từ docs trên! 🚀
- A Create new role-based access controls (RBAC) for each team in the existing cluster, and define resource quotas.
- B Create a new namespace for each environment in the existing cluster, and define resource quotas.
- C Create a new GKE cluster for each team.
- D Create a new namespace for each team in the existing cluster, and define resource quotas.
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 xoay quanh việc quản lý một GKE cluster lớn (Google Kubernetes Engine) nơi nhiều đội ngũ ứng dụng đang chia sẻ cùng một namespace để phát triển microservices. Tổ chức dự định onboard thêm các đội ngũ mới để tạo microservices. Yêu cầu chính là cấu hình nhiều môi trường (multiple environments), đồng thời đảm bảo bảo mật (security), hiệu suất tối ưu (optimal performance) cho công việc của từng đội, giảm thiểu chi phí (minimize cost) và tuân thủ best practices của Google.
🔑 Vấn đề cốt lõi:
- Cần cách ly (isolation) giữa các đội để tránh xung đột tài nguyên, truy cập trái phép.
- Không muốn tốn kém (như tạo cluster mới), nhưng vẫn an toàn và hiệu quả.
- Theo best practices GKE (cập nhật đến 2026): Sử dụng Namespaces để multi-tenancy, kết hợp RBAC (Role-Based Access Control) và ResourceQuotas để kiểm soát quyền hạn và tài nguyên.
✅ Đáp án đúng
Create a new namespace for each team in the existing cluster, and define resource quotas.
Lý do lựa chọn:
- 🛡️ Cách ly hoàn hảo: Mỗi đội có namespace riêng trong cùng cluster, giúp isolate workloads, tránh xung đột (network policies, secrets, services riêng biệt).
- 📊 Kiểm soát tài nguyên: ResourceQuotas giới hạn CPU, memory, pods per namespace, đảm bảo performance và tránh "noisy neighbor".
- 💰 Tiết kiệm chi phí: Giữ nguyên cluster hiện tại, không tạo mới (rẻ hơn nhiều so với multi-cluster).
- 🏆 Best practices Google: Tài liệu GKE khuyến nghị namespace per team/environment cho multi-tenancy (GKE Enterprise, Autopilot mode 2025+ hỗ trợ tốt hơn với namespace isolation). Kết hợp RBAC để authorize per namespace.
📋 Giải thích tất cả các phương án
-
❌ Create new role-based access controls (RBAC) for each team in the existing cluster, and define resource quotas.
Phương án này sai vì chỉ dùng RBAC và quotas trên namespace chung, không tạo isolation thực sự. Các đội vẫn chia sẻ namespace → dễ xung đột services, secrets, network (ví dụ: một đội expose port conflict). Không đáp ứng "multiple environments" và security isolation. Best practices yêu cầu namespace riêng trước khi apply RBAC/quotas. -
❌ Create a new namespace for each environment in the existing cluster, and define resource quotas.
Phương án này sai (dù gần đúng) vì dùng "each environment" thay vì "each team". Câu hỏi nhấn mạnh "each team’s work" → nếu environment khác team (ví dụ: dev/staging/prod per team), sẽ không khớp. Dẫn đến thiếu granularity, có thể overload nếu nhiều team share environment. Google docs ưu tiên namespace per team/group để align với RBAC. -
❌ Create a new GKE cluster for each team.
Phương án này sai hoàn toàn vì vi phạm "minimize cost" (cluster mới tốn node pool, networking, management fee cao gấp nhiều lần). Không scalable cho "large cluster" và additional teams. Performance kém do multi-cluster complexity (federation, cross-cluster comms). Best practices GKE: Chỉ dùng multi-cluster khi cần hard isolation (như regulated industries), không phải default. -
✅ Create a new namespace for each team in the existing cluster, and define resource quotas.
Như đã giải thích ở trên: Hoàn hảo về security (NetworkPolicies + RBAC), performance (quotas), cost (single cluster), và best practices.
📘 Tài liệu tham khảo (cập nhật 2026)
- GKE Documentation: Multi-tenancy with namespaces & Resource quotas (Khuyến nghị namespace per tenant/team).
- GKE Best Practices: Organizing cluster resources (2025 update với Autopilot v1.30+).
- RBAC Guide: Configure RBAC for GKE – Áp dụng per namespace.
- ✅ Kiểm tra thực tế:
kubectl create namespace team-a; kubectl apply -f quota.yaml -n team-a.
🛠️ Khuyến nghị triển khai: Sau namespace, apply LimitRange + NetworkPolicy cho security chặt chẽ hơn!