Skip to content

Add end-to-end GKE deployment capability to deployment skill#115

Open
alex-doudou wants to merge 5 commits intomainfrom
gke
Open

Add end-to-end GKE deployment capability to deployment skill#115
alex-doudou wants to merge 5 commits intomainfrom
gke

Conversation

@alex-doudou
Copy link
Copy Markdown
Contributor

  • Tests pass
  • Appropriate changes to documentation are included in the PR
  • Deployment verified with spring-petclinic

This PR:

  • Added Workflow D: Google Kubernetes Engine (GKE) to SKILL.md.
  • Updated deploy_prompt.md to include GKE as a deployment option.
  • Created references/how_to_deploy_to_gke_with_kubectl.md with detailed instructions.
  • Verified workflow by successfully deploying spring-petclinic to a new GKE Autopilot cluster.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new GKE deployment workflow to the CI/CD assistant prompts and documentation, including a detailed reference guide for GKE deployment via kubectl. The review feedback suggests adding resource requests and limits to the example Kubernetes deployment manifest for better stability, improving consistency by referencing the new GKE guide in the deploy_prompt.md, and refining the verification steps in both the prompt and SKILL.md to align with the more comprehensive commands provided in the new reference document.

haroonc and others added 4 commits March 28, 2026 10:02
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* If the type is a static application, follow **Workflow A: Google Cloud Storage**.
* If the type is a container based application, ask the user if they would like to deploy to Cloud Run using buildpacks or build an image.
* If the type is a container based application, ask the user if they would like to deploy to Cloud Run or Google Kubernetes Engine (GKE).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still want to offer an option to deploy to Cloud Run using buildpacks or build an image. It seems that option got dropped


This workflow is for deploying container-based applications to a GKE cluster. Consult the `references/how_to_deploy_to_gke_with_kubectl.md` file for detailed `gcloud` and `kubectl` commands and best practices.

1. **Identify Cluster**: Ask the user for the GKE cluster name and location (zone or region) if not already known.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to first check local environment (e.g. from ~/.kube/config or kubectl config)

This workflow is for deploying container-based applications to a GKE cluster. Consult the `references/how_to_deploy_to_gke_with_kubectl.md` file for detailed `gcloud` and `kubectl` commands and best practices.

1. **Identify Cluster**: Ask the user for the GKE cluster name and location (zone or region) if not already known.
2. **Create Dockerfile**: If a Dockerfile does not already exist, analyze the project to determine the appropriate base image and build steps, then create a multistage Dockerfile. Ensure the Dockerfile can be built locally using the Docker cli.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have detailed references, and examples for creating Dockerfile in the design skill. Perhaps you can invoke that skill here?

4. **Create Artifact Registry Repository**: Create the Artifact Registry repository using the `create_artifact_repository` tool.
5. **Build and Push Image**: Using the Docker cli, build the Docker image locally using the created Dockerfile and push the image to the created Artifact Registry repository.
6. **Manifest Preparation**: Check for existing Kubernetes manifests (e.g., `deployment.yaml`, `service.yaml`) in the project. If they don't exist, generate a standard `Deployment` and `LoadBalancer` `Service` manifest. Ensure the manifests use the correct image URI from Step 5 and have appropriate resource limits and labels.
7. **Deploy to GKE**: Use standard `gcloud` and `kubectl` commands to deploy:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have more detailed instructions in how_to_deploy_to_gke_with_kubectl.md‎. It might be better to just reference that here, rather than specific commands.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments for deploy_prompt.md that applies here as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants