Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En este documento, se describe cómo configurar un Google Cloud proyecto y una máquina virtual (VM) de Compute Engine.
Configura un Google Cloud proyecto
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Para inicializar gcloud CLI, ejecuta el siguiente comando:
gcloudinit
¿Necesitas credenciales? Solo necesitas credenciales si planeas llamar directamente a las APIs de Dataproc desde tu aplicación o desde un navegador. Si planeas usar la Google Cloud consola o laCLI de Google Cloud para crear y administrar clústeres, y enviar trabajos, solo necesitas acceder al SDK con el comando gcloud init.
Opcional: Configura una VM
Si planeas ejecutar la CLI de gcloud desde una instancia de máquina virtual (VM) de Compute Engine, la VM debe estar configurada para acceder a los servicios de Google Cloud .
Para probar si tu VM está configurada de forma correcta, ejecuta gcloud compute instances describe YOUR_VM_INSTANCE_NAME desde la línea de comandos. Se debe incluir una cuenta de servicio que incluya el alcance https://www.googleapis.com/auth/cloud-platform. Para obtener más información sobre cómo configurar una VM, consulta Crea una VM que use una cuenta de servicio administrada por el usuario.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[[["\u003cp\u003eThis document provides instructions on setting up a Google Cloud project and a Compute Engine virtual machine (VM).\u003c/p\u003e\n"],["\u003cp\u003eCredentials are only necessary when directly calling Dataproc APIs from an application or browser, not when using the Google Cloud console or the gcloud CLI.\u003c/p\u003e\n"],["\u003cp\u003eIf utilizing a Compute Engine VM to run gcloud CLI, it must be configured to access Google Cloud services, with a service account that includes the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eCloud Shell can be used as an alternative to setting up a personal VM, as it automatically provisions a VM with the necessary scopes to run gcloud CLI commands.\u003c/p\u003e\n"]]],[],null,["This document describes how to set up a Google Cloud project and a\nCompute Engine virtual machine (VM).\n\nSet up a Google Cloud project\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Google Cloud Dataproc API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=dataproc)\n-\n [Install](/sdk/docs/install) the Google Cloud CLI.\n\n- If you're using an external identity provider (IdP), you must first\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n-\n To [initialize](/sdk/docs/initializing) the gcloud CLI, run the following command:\n\n ```bash\n gcloud init\n ```\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Google Cloud Dataproc API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=dataproc)\n-\n [Install](/sdk/docs/install) the Google Cloud CLI.\n\n- If you're using an external identity provider (IdP), you must first\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n-\n To [initialize](/sdk/docs/initializing) the gcloud CLI, run the following command:\n\n ```bash\n gcloud init\n ```\n\n\u003cbr /\u003e\n\n| **Note:** When you enable the Dataproc API, the Dataproc Control API is also enabled. Disabling the Dataproc API doesn't disable the Dataproc Control API. You must separately disable the Dataproc Control API.\n\n**Do you Need Credentials?** You need credentials only if\nyou plan to directly call Dataproc APIs from your application or from\na browser. If you plan on using the Google Cloud console or the\n[Google Cloud CLI](/sdk/gcloud/reference/dataproc) to\ncreate and manage clusters and to submit jobs, you only need to be logged in\nto the SDK with the `gcloud init` command.\n\nOptional: Set up a VM\n\nIf you plan to run [gcloud CLI](/sdk/docs) from a\nCompute Engine virtual machine (VM) instance, the VM must be set up\nto access Google Cloud services.\n\nTo test whether your VM is set up correctly, run\n`gcloud compute instances describe `\u003cvar translate=\"no\"\u003eYOUR_VM_INSTANCE_NAME\u003c/var\u003e\nfrom the command line. A service account must be listed that includes the\n`https://www.googleapis.com/auth/cloud-platform` scope. For more information\non setting up a VM, see\n[Create a VM that uses a user-managed service account](/compute/docs/access/create-enable-service-accounts-for-instances).\n| **Use Cloud Shell to run\n| gcloud CLI commands.** As an alternative to setting up your own VM to run SDK commands, open a [Cloud Shell](/shell/docs/quickstart) session to automatically provision a VM with the necessary scopes, and then run gcloud CLI commands from Cloud Shell.\n\n*** ** * ** ***\n\n[Next Step: Create a Cluster](/dataproc/docs/guides/create-cluster)"]]