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.
Geben Sie im Bereich Bucket benennen einen eindeutigen Namen für den Bucket ein.
Klicken Sie auf Weiter.
Gehen Sie im Bereich Speicherort für Daten auswählen so vor:
Wählen Sie als Standorttyp die Option Region und dann us-east1 (South Carolina) aus der Liste aus.
Klicken Sie auf Weiter.
Führen Sie im Bereich Speicherklasse für Daten auswählen die folgenden Schritte aus:
Wählen Sie Standardklasse festlegen und dann Standard aus.
Klicken Sie auf Weiter.
Führen Sie im Bereich Zugriff auf Objekte steuern die folgenden Schritte aus:
Entfernen Sie das Häkchen bei Verhinderung des öffentlichen Zugriffs für diesen Bucket erzwingen.
Wählen Sie für Zugriffssteuerung die Option Einheitlich aus.
Klicken Sie auf Weiter.
Behalten Sie im Bereich Auswählen, wie Objektdaten geschützt werden die Standardeinstellungen bei und klicken Sie dann auf Erstellen.
Objekt in den Bucket hochladen
Speichern Sie das folgende Bild auf Ihrem Gerät:
Klicken Sie auf der Seite Bucket-Details auf dem Tab Objekte auf Dateien hochladen.
Wählen Sie im Dateidialogfeld die heruntergeladene Datei aus.
Nach Abschluss des Uploads werden der Dateiname und Informationen zur Datei wie Größe und Dateityp angezeigt.
Bucket veröffentlichen
Klicken Sie auf der Seite Bucket-Details auf den Tab Berechtigungen.
Achten Sie darauf, dass die Ansicht auf Von Hauptkonten anzeigen festgelegt ist, und klicken Sie dann auf Zugriff gewähren.
Der Bereich Principals hinzufügen wird angezeigt.
Geben Sie im Feld Neue HauptkontenallUsers ein.
Wählen Sie in der Liste Rolle auswählen die Option Cloud Storage > Storage-Objekt-Betrachter aus.
Klicken Sie auf Speichern.
Klicken Sie auf der Seite Möchten Sie diese Ressource wirklich öffentlich zur Verfügung stellen? auf Öffentlichen Zugriff erlauben.
Sie können überprüfen, ob das Objekt öffentlich freigegeben wurde. Klicken Sie dazu auf den Tab Objekte, um zur Liste der Objekte zurückzukehren.
In der Spalte Öffentlicher Zugriff des Objekts muss Öffentlich im Internet stehen. Die Schaltfläche URL kopieren bietet eine URL zum Weitergeben, die ungefähr so aussieht:
Geben Sie auf der Seite Neuer Ursprung im Bereich Ursprungsname einen Namen für Ihren Ursprung ein.
Wählen Sie als Ursprungstyp die Option Backend-Bucket aus.
Wählen Sie für Backend-Bucket definieren die Option Neuer Backend-Bucket aus.
Klicken Sie im Feld Cloud Storage-Bucket auf Durchsuchen.
Wählen Sie den zuvor erstellten Cloud Storage-Bucket aus, klicken Sie auf Auswählen und dann auf Weiter.
Wählen Sie im Bereich Load-Balancer anhängen die Option Neuen Load-Balancer für mich erstellen aus. Geben Sie einen Namen für den Load-Balancer ein und klicken Sie dann auf Weiter.
Behalten Sie für Cache-Leistung die ausgewählten Standardeinstellungen bei und klicken Sie auf Fertig.
Der neue Ursprung wird in der Liste der Ursprünge angezeigt. Es kann einige Minuten dauern, bis der Ursprung vollständig erstellt ist. Fahren Sie erst mit dem nächsten Schritt fort, wenn Sie eine Benachrichtigung sehen, dass der Ursprung erstellt wurde.
Cloud CDN testen
Rufen Sie in der Google Cloud Console die Seite Load-Balancing auf.
Klicken Sie auf den Namen des Load-Balancers, den Sie zuvor erstellt haben.
Die Seite Details zum Lastenausgleichsmodul wird angezeigt.
Notieren Sie sich die unter IP:Port angezeigten IPv4-Adressen.
Testen Sie Cloud CDN. Geben Sie dazu die folgende URL mit der IP-Adresse des Load-Balancers in einem neuen Browsertab ein:
http://IP_ADDRESS/kitten.png
Ihr Browser sollte eine Seite mit dem hochgeladenen Bild rendern.
Aktualisieren Sie die Seite mehrmals.
Kehren Sie zur Seite Details zum Load-Balancer zurück und klicken Sie auf Monitoring.
Beobachten Sie nach einigen Minuten den bereitgestellten Traffic.
Traffic, der direkt aus Ihrem Backend-Bucket bereitgestellt wird, ist mit SERVED_FROM_BACKEND_BUCKET gekennzeichnet. Von Cloud CDN bereitgestellter Traffic ist mit SERVED_FROM_CACHE gekennzeichnet. Weitere Informationen finden Sie unter Monitoring-Messwerte.
Bereinigen
Mit den folgenden Schritten vermeiden Sie, dass Ihrem Google Cloud -Konto die auf dieser Seite verwendeten Ressourcen in Rechnung gestellt werden:
Löschen Sie den Load-Balancer und den Backend-Bucket:
Rufen Sie in der Google Cloud Console die Seite Load-Balancing auf.
Klicken Sie auf das Kästchen neben dem von Ihnen erstellten Load-Balancer und dann auf Löschen.
Klicken Sie auf der angezeigten Seite das Kästchen neben dem von Ihnen erstellten Backend-Bucket an und bestätigen Sie, dass Sie den Load-Balancer und die ausgewählten Ressourcen löschen möchten.
Löschen Sie den Cloud Storage-Bucket:
Wechseln Sie in der Google Cloud Console unter „Cloud Storage“ zur Seite Buckets.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-01 (UTC)."],[[["\u003cp\u003eThis guide demonstrates setting up a backend bucket as an origin for Cloud CDN using the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eYou'll create a Cloud Storage bucket, upload an object, and make it publicly accessible to use it as an origin.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves creating a backend bucket, setting up an external Application Load Balancer, and linking them.\u003c/p\u003e\n"],["\u003cp\u003eYou can test the Cloud CDN setup by accessing the uploaded image via the load balancer's IP address, observing traffic served from either the backend or the cache.\u003c/p\u003e\n"],["\u003cp\u003eThe guide details the steps required to clean up and delete the created resources.\u003c/p\u003e\n"]]],[],null,["Set up a backend bucket as an origin for Cloud CDN This quickstart shows you how to set up a backend bucket as an origin for\nCloud CDN by using the Google Cloud console.\n\n*** ** * ** ***\n\nTo follow step-by-step guidance for this task directly in the\nGoogle Cloud console, click **Guide me**:\n\n[Guide me](https://console.cloud.google.com/freetrial?redirectPath=/?walkthrough_id=cdn--console_quickstart)\n\n*** ** * ** ***\n\n\nBefore you begin 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\nIn the Google Cloud console, on the project selector page,\nselect or create a Google Cloud project.\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\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). \nIn the Google Cloud console, on the project selector page,\nselect or create a Google Cloud project.\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\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\nCreate a Cloud Storage bucket\n\n\n*Buckets* are the basic containers that hold your data in\nCloud Storage.\n\n\nTo create a bucket, follow these steps:\n\n1. In the Google Cloud console, go to the Cloud Storage **Buckets** page. \n\n [Go to Buckets](https://console.cloud.google.com/storage/browser)\n2. Click add_box **Create** . Show me.\n3.\n In the\n **Name your bucket** section, enter a unique name for your\n bucket.\n\n\n | **Warning:** Do not include sensitive information in the bucket name. The bucket namespace is global and publicly visible.\n\n \u003cbr /\u003e\n\n\n Click **Continue**.\n4. In the **Choose where to store your data** section, do the following:\n 1. For **Location type** , select **Region** , and then select `us-east1 (South Carolina)` from the list.\n 2. Click **Continue**.\n5. In the **Choose a storage class for your data** section, do the following:\n 1. Select **Set a default class** , and then select **Standard**.\n 2. Click **Continue**.\n6. In the **Choose how to control access to objects** section, do the following:\n - Clear the **Enforce public access prevention on this bucket** checkbox.\n - For **Access control** , select **Uniform**.\n - Click **Continue**.\n7. In the **Choose how to protect object data** section, keep the selected defaults, and then click **Create** .\n\nUpload an object into the bucket\n\n1. Save the following image on your device:\n\n2. On the **Bucket details** page, on the **Objects** tab, click **Upload files** .\n3. In the file dialog, select the file that you downloaded.\n\nAfter the upload completes, the filename and information about the file, such as its size and file type, are displayed.\n\nMake your bucket public\n\n1. On the **Bucket details** page, click the **Permissions** tab.\n2. Ensure that the view is set to\n **View by principals** , and then click\n **Grant access** .\n\n The **Add principals** pane is displayed.\n3. In the **New principals** field, enter `allUsers`.\n4. In the **Select a role** list, select **Cloud Storage\n \\\u003e Storage Object Viewer**.\n5. Click **Save**.\n6. On the **Are you sure you want to make this resource public?** page, click **Allow public access**.\n7. To verify that the object has been shared publicly, click the **Objects** tab to return to the list of objects. Your object's **Public access** column should read **Public to\n internet** . The **Copy URL** button provides a shareable URL similar to the following:\n\n\n `https://storage.googleapis.com/`\u003cvar translate=\"no\"\u003eYOUR_BUCKET_NAME\u003c/var\u003e`/kitten.png`\n\nCreate a backend bucket\n\nTo create a backend bucket and an external Application Load Balancer, do the following:\n\n1.\n In the Google Cloud console, go to the **Cloud CDN** page.\n\n [Go to Cloud CDN](https://console.cloud.google.com/net-services/cdn)\n\n \u003cbr /\u003e\n\n2. Click\n **Add origin** .\n\n3. On the **New origin** page, in the\n **Origin name**\n section, enter a name for your origin.\n\n4. For\n **Origin type** , select **Backend bucket**.\n\n5. For\n **Define your backend bucket** , select **New backend bucket**.\n\n6. In the **Cloud Storage bucket** field, click **Browse**.\n\n7. Select the Cloud Storage bucket that you created earlier, click\n **Select** , and then click **Next**.\n\n8. In the\n **Attach a load balancer** section, select **Create new load balancer\n for me** , enter a name for the load balancer, and then click **Next**.\n\n9. For **Cache performance** , keep the selected defaults, and then click\n **Done** .\n\n The new origin appears in the list of origins. It might take a few minutes\n for the origin to be fully created. Proceed to the next step only after you\n see a notification indicating that the origin has been created.\n\nTest Cloud CDN\n\n1. In the Google Cloud console, go to the **Load balancing** page.\n\n [Go to Load balancing](https://console.cloud.google.com/net-services/loadbalancing/list/loadBalancers)\n\n \u003cbr /\u003e\n\n \u003cbr /\u003e\n\n2. Click the\n name of the load balancer that you created\n earlier.\n\n The **Load balancer details** page is displayed.\n3. Note the IPv4 addresses displayed under\n **IP:Port** .\n\n4. Test Cloud CDN by entering the following URL with the load\n balancer's IP address in a new browser tab:\n\n http://\u003cvar translate=\"no\"\u003eIP_ADDRESS\u003c/var\u003e/kitten.png\n\n Your browser should render a page with the uploaded image.\n5. Refresh the page multiple times.\n\n6. Return to the **Load balancer details** page, and then click **Monitoring**.\n\n7. After a few minutes, observe the served traffic.\n\n Traffic that is served directly from your backend bucket is labeled\n **SERVED_FROM_BACKEND_BUCKET** . Traffic that is served from\n Cloud CDN is labeled **SERVED_FROM_CACHE** . For more information,\n see [Monitoring metrics](/load-balancing/docs/https/https-logging-monitoring#monitoring_metrics).\n\n\nClean up\n\n\nTo avoid incurring charges to your Google Cloud account for\nthe resources used on this page, follow these steps.\n\n1. Delete the load balancer and the backend bucket:\n\n 1. In the Google Cloud console, go to the **Load balancing** page.\n\n [Go to Load balancing](https://console.cloud.google.com/net-services/loadbalancing/list/loadBalancers)\n\n \u003cbr /\u003e\n\n \u003cbr /\u003e\n\n 2. Select the check box next to the load balancer that you created, and\n then click **Delete**.\n\n 3. On the page that opens, select the check box next to the backend\n bucket that you created, and then confirm that you want to delete the\n load balancer and the selected resources.\n\n2. Delete the Cloud Storage bucket:\n\n 1. In the Google Cloud console, go to the Cloud Storage **Buckets** page. \n\n [Go to Buckets](https://console.cloud.google.com/storage/browser)\n 2. Select the checkbox next to the bucket that you created, and then click **Delete**.\n 3. In the **Delete bucket** dialog, confirm that you want to delete the bucket, and then click **Delete**.\n\n\nWhat's next\n\nHere's what you can do next:\n\n- [Set up Cloud CDN](/cdn/docs/using-cdn)\n- [Automate Cloud CDN setup with Terraform](/cdn/docs/cdn-terraform-examples)\n- [Authenticate content](/cdn/docs/private-content)"]]