
Answer-first summary for fast verification
Answer: Use Jib to build a Docker image from your source code, and upload it to Artifact Registry. Deploy the application in a GKE cluster, and test the application.
The question requires modernizing the application by converting it to a container without a lift-and-shift approach. Option A uses Migrate for Anthos to directly convert the VM to a container on GKE, which automates containerization but may not involve code-level modernization. Option D involves using Jib to build a Docker image from source code, deploy to GKE, and test—this aligns with best practices for modernizing Java applications by leveraging source code and cloud-native tools. Options B and C involve lift-and-shift (B) or intermediate VM migration (C), which the question explicitly avoids. Since the goal is modernization (not just migration) and assuming access to source code (implied for a developer scenario), Option D is the most appropriate choice.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
What is the recommended approach to cost-effectively migrate a standalone Java application from an on-premises Linux VM to Google Cloud by modernizing it into a containerized solution, avoiding a lift-and-shift strategy?
A
Use Migrate for Anthos to migrate the VM to your Google Kubernetes Engine (GKE) cluster as a container.
B
Export the VM as a raw disk and import it as an image. Create a Compute Engine instance from the Imported image.
C
Use Migrate for Compute Engine to migrate the VM to a Compute Engine instance, and use Cloud Build to convert it to a container.
D
Use Jib to build a Docker image from your source code, and upload it to Artifact Registry. Deploy the application in a GKE cluster, and test the application.