Stay organized with collections
Save and categorize content based on your preferences.
Quickstart: Deploy to Knative serving on VMware
Learn how to enable Knative serving on
Google Distributed Cloud and deploy a prebuilt sample
container to the cluster.
Before you begin
This quickstart assumes you have active Google Distributed Cloud
with Knative serving enabled. To create one, see
Setting up
Knative serving on VMware.
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.
Set the default Google Cloud project that is used by the Google Cloud CLI
to the Google Cloud project that you just created:
gcloudconfigsetprojectPROJECT-ID
Replace PROJECT_ID with the ID of your Google Cloud project.
Install the kubectl command-line tool:
gcloudcomponentsinstallkubectl
Update installed gcloud CLI components:
gcloudcomponentsupdate
Deploying a sample container
To deploy a container to the cluster you just created:
Run the command:
gcloudrundeploySERVICE--imageIMAGE_URL
Replace SERVICE with the name of the service you are deploying
to. You can omit this parameter entirely, but you will be prompted for the
service name if you omit it.
Replace IMAGE_URL with a reference to the container image, for
example, gcr.io/myproject/my-image:latest.
Wait for the deployment to finish. Upon successful completion, a success
message is displayed with the URL of the deployed service.
Accessing your deployed service
After deploying your service, you can use cURL to send a request and verify
the service is working, using the external IP address of the Load Balancer
service created for the Istio ingress controller:
Get and note the IP address using the kubectl command line:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eThis guide outlines how to deploy a prebuilt container to a Google Distributed Cloud cluster with Knative serving enabled on VMware.\u003c/p\u003e\n"],["\u003cp\u003eYou will need to set up the Google Cloud CLI, install \u003ccode\u003ekubectl\u003c/code\u003e, and set your Google Cloud project before deploying.\u003c/p\u003e\n"],["\u003cp\u003eThe deployment process involves using the \u003ccode\u003egcloud run deploy\u003c/code\u003e command with your service name and container image URL.\u003c/p\u003e\n"],["\u003cp\u003eYou can verify the deployed service's functionality by sending a request using cURL and obtaining the service's IP address and domain.\u003c/p\u003e\n"],["\u003cp\u003eYou can delete your deployed service by using the command \u003ccode\u003egcloud run services delete SERVICE\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Quickstart: Deploy to Knative serving on VMware\n===============================================\n\nLearn how to enable Knative serving on\n[Google Distributed Cloud](/gke-on-prem) and deploy a prebuilt sample\ncontainer to the cluster.\n\nBefore you begin\n----------------\n\n1. This quickstart assumes you have active Google Distributed Cloud with Knative serving enabled. To create one, see [Setting up\n Knative serving on VMware](/anthos/run/archive/docs/setup-vmware).\n\n\n For information about GKE Enterprise, see\n [GKE Enterprise Pricing](/anthos/pricing).\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- 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\n2. To send a request to the deployed sample service, [install cURL](https://curl.haxx.se/).\n3. To ensure you have the latest version of the Google Cloud CLI, either install or update the Google Cloud CLI:\n - [Install and initialize the Google Cloud CLI.](/sdk/docs/install)\n - If you've already installed the gcloud CLI, update the installed components: \n\n ```bash\n gcloud components update\n ```\n\n\u003cbr /\u003e\n\n### Setting up the command-line environment\n\nSet up the gcloud CLI and `kubectl` for Knative serving on VMware:\n\n1. [Install and initialize the Google Cloud CLI](/sdk/docs).\n\n2. Set the default Google Cloud project that is used by the Google Cloud CLI\n to the Google Cloud project that you just created:\n\n ```bash\n gcloud config set project PROJECT-ID\n ```\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the ID of your Google Cloud project.\n3. Install the `kubectl` command-line tool:\n\n ```bash\n gcloud components install kubectl\n ```\n4. Update installed gcloud CLI components:\n\n ```bash\n gcloud components update\n ```\n\nDeploying a sample container\n----------------------------\n\nTo deploy a container to the cluster you just created:\n\n1. Run the command:\n\n ```bash\n gcloud run deploy SERVICE --image IMAGE_URL\n ```\n - Replace \u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e with the name of the service you are deploying to. You can omit this parameter entirely, but you will be prompted for the service name if you omit it.\n - Replace \u003cvar translate=\"no\"\u003eIMAGE_URL\u003c/var\u003e with a reference to the container image, for example, `gcr.io/myproject/my-image:latest`.\n2. Wait for the deployment to finish. Upon successful completion, a success\n message is displayed with the URL of the deployed service.\n\nAccessing your deployed service\n-------------------------------\n\nAfter deploying your service, you can use cURL to send a request and verify\nthe service is working, using the external IP address of the Load Balancer\nservice created for the Istio ingress controller:\n\n1. Get and note the IP address using the `kubectl` command line:\n\n \u003cbr /\u003e\n\n ```bash\n kubectl get svc istio-ingress -n gke-system --output 'jsonpath={.status.loadBalancer.ingress[0].ip}'\n ```\n\n \u003cbr /\u003e\n\n2. Get and note the domain using the `kubectl` command line:\n\n \u003cbr /\u003e\n\n ```bash\n kubectl get route SERVICE --output jsonpath='{.status.url}' | sed 's/https\\?:\\/\\///'\n ```\n\n \u003cbr /\u003e\n\n Replace \u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e with the name of the service.\n3. Invoke cURL with the `DOMAIN` and `IP_ADDRESS` of your service:\n\n ```bash\n curl -v -H \"Host: \u003cvar translate=\"no\"\u003eDOMAIN\u003c/var\u003e\" http://IP_ADDRESS\n ```\n\n Replace:\n - \u003cvar translate=\"no\"\u003eDOMAIN\u003c/var\u003e with the domain that you previously obtained.\n - \u003cvar translate=\"no\"\u003eIP_ADDRESS\u003c/var\u003e with the IP address you obtained in previous steps.\n\nClean up\n--------\n\nDelete your Knative serving on VMware service by executing: \n\n```bash\ngcloud run services delete SERVICE\n```\n\nReplace \u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e with the name of the service.\n\nWhat's next\n-----------\n\nTo learn how to build a container from code source, push to Container Registry,\nand deploy, refer to:\n\n- [Building containers](/anthos/run/archive/docs/building/containers)\n- [Troubleshooting](/anthos/run/archive/docs/troubleshooting)"]]