What the agent does
The agent clones the repository into its own cloud sandbox and reads how the manifests are organised before it writes one. In a deployment like GoogleCloudPlatform/microservices-demo, kubernetes-manifests/frontend.yaml holds the frontend Deployment, a ClusterIP Service named frontend on port 80 to container port 8080, and a second Service, frontend-external, of type LoadBalancer, which is how the README's instructions reach the shop: kubectl get service frontend-external and a browser on the external IP. The Deployment's readiness and liveness probes call /_healthz on 8080 with a shop_session-id cookie header, and the container runs as user 1000 with a read-only root filesystem. The same files appear under kustomize/base/, and every variation lives in kustomize/components/: non-public-frontend deletes frontend-external with a $patch: delete, custom-base-url adds a BASE_URL environment variable and rewrites the probe paths, and kustomize/tests/ holds component combinations that .github/workflows/kustomize-build-ci.yaml builds with kubectl kustomize and kustomize build.
Given that layout, the agent does not edit frontend.yaml in place. It adds a component, kustomize/components/ingress/, with a kustomization.yaml of kind Component and a frontend-ingress.yaml holding a networking.k8s.io/v1 Ingress with one rule, path / and pathType: Prefix, to the existing frontend Service on port 80, and the same $patch: delete on frontend-external the non-public component uses, so a cluster does not pay for a load balancer the Ingress replaces. The host and ingressClassName are left for an overlay to set, with a README.md in the component that follows the shape of the others: what it changes, kustomize edit add component components/ingress, and the kubectl kustomize . to render it.
The repository already has a GKE-specific version of the same idea in .github/release-cluster/frontend-ingress.yaml, with a static IP annotation, a managed certificate and a FrontendConfig, and a Service annotated for network endpoint groups. The agent reads it so the component matches the release cluster's backend and port, and keeps those annotations out of the component because they only mean something on one provider, noting in the README how to add them in an overlay. It adds the component to the commented list in kustomize/kustomization.yaml and in kubernetes-manifests/kustomization.yaml, and adds kustomize/tests/ingress-with-non-public-frontend/kustomization.yaml so the CI job builds the combination on every pull request.
Then it renders and validates what CI would. It runs kubectl kustomize kustomize/tests/ingress-with-non-public-frontend and checks the output has exactly one frontend Service, no frontend-external, and an Ingress whose backend name and port match, and it runs the kubevious CLI over kustomize/ the way .github/workflows/kubevious-manifests-ci.yaml does. Where the sandbox can start a kind cluster, it installs the ingress-nginx controller, applies the rendered output with the release images from release/kubernetes-manifests.yaml, and curls the frontend through the controller's address; the pull request says whether that step ran.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "Add an Ingress for the frontend of this Kubernetes application. Read kubernetes-manifests/frontend.yaml, kustomize/kustomization.yaml, kustomize/base/kustomization.yaml, every component under kustomize/components, kustomize/tests, .github/release-cluster/frontend-ingress.yaml and the two manifest CI workflows first. Add a Kustomize component kustomize/components/ingress with a networking.k8s.io/v1 Ingress routing / with pathType Prefix to the frontend Service on port 80, a $patch: delete for the frontend-external LoadBalancer Service as the non-public-frontend component does, no provider-specific annotations, and a README in the style of the other components explaining how to set the host and ingressClassName in an overlay. Add the component to the commented lists in both kustomization.yaml files and a kustomize/tests combination with non-public-frontend. Render it with kubectl kustomize, check one frontend Service and no frontend-external remain and the Ingress backend matches, run the kubevious CLI over kustomize/ as CI does, and if you can start a kind cluster apply the rendered manifests with ingress-nginx and curl the frontend through it. Open a pull request listing the files, the rendered Ingress and what you verified.",
"resources": [
{
"url": "https://github.com/your-org/your-app"
}
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
What comes back is a pull request on its own branch adding kustomize/components/ingress/kustomization.yaml, kustomize/components/ingress/frontend-ingress.yaml and kustomize/components/ingress/README.md, a new test combination under kustomize/tests/, and one commented line in each of kustomize/kustomization.yaml and kubernetes-manifests/kustomization.yaml. Nothing under kustomize/base/ or kubernetes-manifests/*.yaml changes, so a cluster that applies the manifests as before gets exactly what it got.
The description includes the rendered Ingress, the Service list before and after the component is applied, and the kubevious output, and it says plainly whether the kind smoke test ran. The transcript at GET /o/{org}/sessions/{id}/messages keeps the kubectl kustomize and validation output, and the curl through the controller when it ran, so a reviewer can check the backend name and port rather than trust a sentence.
Before merging, a reviewer checks that the $patch: delete names frontend-external exactly, that pathType is Prefix rather than the GKE-only ImplementationSpecific, and that the README says where the host goes. A follow-up on the same session can add a TLS block with a cert-manager annotation or wire the Helm chart under helm-chart/ with the same option.
Run it on every Linear issue labelled platform
Add an automation to the Project with this prompt and a linear trigger on linear.issue.labeled, filtered to the platform label. When someone labels an issue such as "expose the frontend through the shared ingress controller instead of its own load balancer", the trigger places the issue after the prompt, the run reads which Service and host the issue names, and the pull request links back to it. Only label changes made by a person in your Rush org fire the trigger, and the automation starts at most max_runs_per_hour runs in an hour.
From a script, the same body goes to POST /o/{org}/sessions with the repository in resources, the Linear issue URL as a second resource, and a request_id that is a UUID v5 of the issue id so a retry returns the run already started. Give the key a webhook_url and every run the key starts posts run.completed with data.session_url, from which a handler reads the pull request link.
The use case this job follows, with its automation and trigger: Turn a Linear label into a PR.
Why run it on Rush?
An Ingress is a few dozen lines, and the mistakes are all in the surroundings: a backend name that does not match the Service, a load balancer left running beside it, a provider annotation copied into manifests meant to be portable. The agent reads the base, every component and the release cluster's version before writing, and proves the result by rendering and validating it the same way the repository's CI does, in its own sandbox with kubectl, kustomize and Docker available.
The rendered output and the validation runs stay in the run's transcript, so the pull request shows the Ingress as a cluster would receive it. Several environments can get the same component at once, each in its own sandbox and its own pull request.
Frequently asked questions
Will it keep the existing LoadBalancer Service?
Not when the component is applied: it deletes frontend-external with the same $patch: delete the repository's non-public-frontend component already uses, so the Ingress is the only public entry. Leave the component out of your kustomization.yaml and the manifests are unchanged, so both paths stay available.
Which ingress controller does it assume?
None. The Ingress sets no ingressClassName and no controller annotations, and the component README explains how an overlay adds the class, the host and provider settings such as the GKE static IP and managed certificate that the repository's release cluster uses.
Does it test against a real cluster?
It renders and validates in every run, and when the sandbox can start a kind cluster it also applies the manifests with ingress-nginx and curls the frontend through it. The pull request states which of those happened, so a smoke test that could not run is never reported as one that did.
What about the Helm chart in the same repository?
The pull request is scoped to the Kustomize layout, which is what the manifest CI builds. Adding an ingress value to helm-chart/values.yaml and a template under helm-chart/templates/ is a natural follow-up on the same session.