Continuously deploying and testing a Kubernetes app remotely while you code
Follow these steps to see the results of your work while you write code:
- Click Cloud Code in the status bar and then select Run on Kubernetes.
- When prompted, click Use current context. This should be the context of your newly created GKE cluster:

Figure 3.13 – Selecting the Kubernetes context
- In Choose Image Repository, type the path of the Artifact Registry repository you created:

Figure 3.14 – Choose Image Repository
This will be us-central1-docker.pkg.dev/PROJECT_ID/scdbook-repo
, where PROJECT_ID
is your Google Cloud project ID:

Figure 3.15 – Repository address
The build starts and the application is deployed to the GKE cluster you created. For a newly created GKE Autopilot cluster, this could take a couple of minutes while Autopilot allocates the needed resources.
-
...