Gemini Enterprise
A Gemini Enterprise app can call lookout’s tools through a Custom MCP Server data store. In this setup every call reads the cluster and Google Cloud as the person who asked, with their own Google access token:
- What a person sees is what their own Kubernetes RBAC and Cloud IAM allow. On GKE, IAM roles grant Kubernetes access too.
- lookout’s own identity reads nothing. Its ServiceAccount has no RBAC at all.
- Each tool call in the access log names the person who made it.
How it works is on the MCP setup page. This page is the walk-through, under an hour the first time.
What you need
Section titled “What you need”- A GKE cluster. Callers’ tokens are only ever sent to an
httpsAPI server with verified TLS, which in-cluster lookout satisfies. - A Gemini Enterprise app in the same Google Workspace organization, and permission to add data stores to it.
- A hostname you control (
lookout.example.combelow), and a certificate for it in Certificate Manager (step 2 creates one). gcloudandkubectlpointed at the project and cluster.
export PROJECT=your-projectgcloud config set project "$PROJECT"1. An OAuth client
Section titled “1. An OAuth client”In the console, Google Auth Platform:
- The consent screen’s audience must be Internal, so
cloud-platformneeds no app verification. An Internal app needs no scopes listed under Data access: the data store requests them. - Clients → Create client, type Web application, name
lookout. Mark it as used by an AI-powered agent if the console asks. - Authorized redirect URI:
https://vertexaisearch.cloud.google.com/oauth-redirect - Create, and note the client ID and secret. The secret only goes into the data store in step 5.
If your organization restricts Google Cloud scopes, sign-in will fail with “Access blocked: your institution’s admin needs to review” until a Workspace admin marks this client Trusted.
2. A static IP, DNS and a certificate
Section titled “2. A static IP, DNS and a certificate”lookout serves through a GKE Gateway (a global external Application Load Balancer) whose TLS comes from a Certificate Manager map.
gcloud compute addresses create lookout-mcp-ip --globalgcloud compute addresses describe lookout-mcp-ip --global --format='value(address)'Point an A record for your hostname at that address.
If you already have a certificate map covering the hostname (a wildcard for the domain, say), use it and skip the rest of this step. Otherwise create a Google-managed certificate, authorized through DNS, and a map holding it:
gcloud certificate-manager dns-authorizations create lookout-mcp --domain=lookout.example.comgcloud certificate-manager dns-authorizations describe lookout-mcp \ --format='value(dnsResourceRecord.name,dnsResourceRecord.type,dnsResourceRecord.data)'# add that CNAME record to your DNS, then:gcloud certificate-manager certificates create lookout-mcp \ --domains=lookout.example.com --dns-authorizations=lookout-mcpgcloud certificate-manager maps create lookout-mcpgcloud certificate-manager maps entries create lookout-mcp \ --map=lookout-mcp --certificates=lookout-mcp --hostname=lookout.example.comThe certificate is issued once the CNAME resolves, usually within
minutes; gcloud certificate-manager certificates describe lookout-mcp
shows ACTIVE.
3. Deploy
Section titled “3. Deploy”Fetch the overlay, edit config.yaml, and apply it:
git clone --depth 1 --branch vX.Y.Z https://github.com/go-steer/k8s-lookoutcd k8s-lookout/deploy/mcp$EDITOR config.yaml # DOMAIN, GOOGLE_CLIENT_ID, GOOGLE_ALLOW, GOOGLE_ALLOW_WRITE (+ GOOGLE_GROUPS_SERVICE_ACCOUNT for groups)kubectl apply -k .Two names in gateway.yaml are yours too, if they differ from the
defaults above: the static IP (NamedAddress, lookout-mcp-ip) and the
certificate map (the networking.gke.io/certmap annotation,
lookout-mcp). The cluster needs the Gateway API (Autopilot has it;
on Standard, --gateway-api=standard). (The Helm chart deploys the same
objects via helm install lookout-mcp ./deploy/chart -n agent-triage --set mode=mcp, and the legacy deploy-mcp-gemini/ directory stays as
a compatibility alias.)
Or keep the overlay remote and set everything from your own
kustomization. Set the config.yaml values with a configMapGenerator
merge, not a patch, and list the domain component: the overlay copies
DOMAIN into the route’s hostname when it is built, and only a merge
lands early enough for the component to copy your value instead.
resources: - github.com/go-steer/k8s-lookout/deploy/mcp?ref=vX.Y.Zcomponents: - github.com/go-steer/k8s-lookout/deploy/mcp/domain?ref=vX.Y.ZconfigMapGenerator: - name: lookout-mcp namespace: agent-triage behavior: merge literals: - DOMAIN=lookout.example.com - GOOGLE_CLIENT_ID=123456789012-abc.apps.googleusercontent.com - GOOGLE_ALLOW=@example.com - GOOGLE_ALLOW_WRITE=patches: - target: {kind: Gateway, name: lookout-mcp} patch: |- - op: replace path: /metadata/annotations/networking.gke.io~1certmap value: my-cert-map - op: replace path: /spec/addresses/0/value value: my-static-ipEither way it creates, in agent-triage:
- a
lookout-mcpServiceAccount, with no RBAC and no Workload Identity; - two stateless
lookout mcpreplicas in Google-token mode, one per zone, serving thetriageandaudittool profiles plus six incident reads (cluster health, recent changes, event timeline, resource spec, blast radius, resource top) — minusfindings diff, which needs a store — with the access log on stdout; - a
gke-l7-global-external-managedGateway onlookout-mcp-ip, HTTPS only, an HTTPRoute forDOMAIN, a health check on the metadata path and a 300 s backend timeout.
Once kubectl -n agent-triage get gateway lookout-mcp shows
PROGRAMMED True, allow a minute or two for the load balancer to start
answering HTTPS:
curl -s https://lookout.example.com/.well-known/oauth-protected-resource/mcpThe metadata names https://accounts.google.com as the authorization
server. curl -X POST https://lookout.example.com/mcp gets a 401: no
token.
Rollouts keep a serving pod behind the load balancer (a preStop drain,
maxUnavailable: 0). One gap remains: the Gateway attaches a zone to
the load balancer only minutes after the first pod lands there, and
GKE counts a pod in a not-yet-attached zone as ready. If a rollout moves
every replica into zones the load balancer has never served, requests
fail until the attach completes. Spreading replicas across zones makes
that unlikely, and it stops once each zone has been attached.
A different image
Section titled “A different image”The overlay runs ghcr.io/go-steer/lookout:vX.Y.Z-gke, the build with
the Google Cloud provider: the cloud checks call Cloud APIs with the
caller’s token, and the GCP-free :vX.Y.Z answers them
read.unavailable. To run another flavor, a mirror, or your own build,
add an images: entry to your kustomization:
images: - name: ghcr.io/go-steer/lookout newName: us-docker.pkg.dev/my-project/mirror/lookout newTag: vX.Y.Z-gke # or digest: sha256:...Many clusters
Section titled “Many clusters”By default lookout reads the cluster it runs in. Set CLUSTERS_FROM in
config.yaml to serve many clusters, across projects, from the same
endpoint:
CLUSTERS_FROM: "organizations/123456789012" # or folders/<id>, fleet:<host-project>, my-project,...Each caller then sees only the clusters they can read: lookout discovers
them with the caller’s own token (through Cloud Asset Inventory for a
folder or organization, or a Resource Manager walk where that API is
off), so it still needs no IAM of its own. Every tool takes a cluster
argument, and k8s_list_clusters lists the names. Ask Gemini about a
cluster by name (“is anything broken in checkout?”), or let it list them
first. The clusters must have their control-plane DNS endpoint enabled,
the only way lookout reaches a cluster it does not run in. See
MCP setup for the
details.
4. Give people access
Section titled “4. Give people access”lookout reads as each person, so each person needs read access to what they will ask about, granted as usual:
- Kubernetes: a
viewClusterRole binding (or a namespaced Role) for their Google account or group, or an IAM role such asroles/container.viewer. - Cloud APIs used by the cloud checks (Compute, Monitoring, Logging): their IAM roles in the project.
- With
CLUSTERS_FROM: permission to list the clusters they should see (container.clusters.listin each project, whichroles/container.viewerincludes) and, for a folder or organization, to search Cloud Asset Inventory (cloudasset.assets.searchAllResources) or list its projects.
Someone with access to only some namespaces sees only those. Rows lookout
reads from its own files (triage records, history) are filtered the same
way, and the summary line counts the rest as hidden=<n>.
Admitting a Google group
Section titled “Admitting a Google group”GOOGLE_ALLOW and GOOGLE_ALLOW_WRITE take group:<group email> as well
as emails and @domains: every member of the group, directly or through
nested groups. lookout checks membership in Cloud Identity as a
dedicated service account that it impersonates for those calls only,
because the Workspace role it needs is assigned by email and lookout’s
own principal has none:
-
Enable the Cloud Identity API and create the account:
Terminal window gcloud services enable cloudidentity.googleapis.comgcloud iam service-accounts create lookout-groups -
Let lookout impersonate it. lookout’s principal is the
lookout-mcpKubernetes service account’s:Terminal window gcloud iam service-accounts add-iam-policy-binding \lookout-groups@<PROJECT_ID>.iam.gserviceaccount.com \--role=roles/iam.serviceAccountTokenCreator \--member=principal://iam.googleapis.com/projects/<PROJECT_NUMBER>/locations/global/workloadIdentityPools/<PROJECT_ID>.svc.id.goog/subject/ns/agent-triage/sa/lookout-mcp -
In the Google Admin console, as a super admin of each Workspace whose groups you list: Account > Admin roles, point to Groups Reader, Assign admin > Assign service accounts, enter the service account’s email, Add, Assign role. The account needs no project roles; lookout asks only for the read-only groups scope.
-
In
config.yaml:GOOGLE_ALLOW: "group:sre@example.com"GOOGLE_ALLOW_WRITE: "group:sre-oncall@example.com"GOOGLE_GROUPS_SERVICE_ACCOUNT: "lookout-groups@<PROJECT_ID>.iam.gserviceaccount.com"
At startup lookout mints one token for the account and logs a warning if it cannot, for example while the grant from step 2 is still propagating. On Google Workspace Enterprise and Cloud Identity Premium one call answers a membership check, nested groups included; other editions walk the group’s nested groups instead, which works the same but costs more calls the first time. A verdict is reused for five minutes (a group’s membership list too, on the walk), so removing someone from a group takes effect within about ten. Details: MCP setup.
5. The Custom MCP Server data store
Section titled “5. The Custom MCP Server data store”-
Gemini Enterprise → your app → Data stores → Create data store → Custom MCP Server → Add MCP server. Choose OAuth 2.0:
Field Value MCP Server URL https://lookout.example.com/mcpAuthorization URL https://accounts.google.com/o/oauth2/v2/authAuthorization URL Parameters &access_type=offline&prompt=consentToken URL https://oauth2.googleapis.com/tokenClient ID / Client Secret from step 1 Enable PKCE Support on Scopes openid email https://www.googleapis.com/auth/cloud-platform -
Verify Auth, and sign in with an account
GOOGLE_ALLOWadmits. -
Location global, connector name
lookout, and a description. The assistant uses the description to decide when to call lookout, so say what it is for:lookout: read-only troubleshooting for our Kubernetes (GKE) cluster. Use it for anything about workloads, pods, deployments, crash loops, pending pods, recent changes, logs and cluster health. It reads as the signed-in user, so answers reflect what they are allowed to see.
-
Create and wait for Active.
-
Connect the data store to your app first: until it is connected, Reload custom actions fails with “The service is currently unavailable” without contacting lookout.
-
Actions → Reload custom actions, then enable the connector in the chat.
6. Try it
Section titled “6. Try it”Ask, for example, “Using lookout, what is broken in the cluster right now?” The access log has one line per call with the caller’s email:
kubectl -n agent-triage logs deploy/lookout-mcp | grep tool=Gemini Enterprise refreshes people’s tokens on its own; nobody signs in again mid-conversation.
Changing who can do what
Section titled “Changing who can do what”- Who may call lookout:
GOOGLE_ALLOWinconfig.yaml, thenkubectl apply -k .andkubectl -n agent-triage rollout restart deploy/lookout-mcp. With agroup:entry, changing the group’s members needs no redeploy: it takes effect within about ten minutes. - Who may change state (triage-status records, findings acks):
GOOGLE_ALLOW_WRITE, the same way. Empty means nobody. - Which tools are offered: the
--profile/--toolsarguments inmcp.yaml(see MCP setup). Fewer tools means a cheaper, more accurate assistant.
Not covered by this overlay
Section titled “Not covered by this overlay”The sentinel store. Store-backed tools (triage status, history via
--at) need --store on a file the MCP pod can read. With the
sentinel’s store on a ReadWriteOnce volume, that means running
lookout mcp as a second container in the sentinel’s pod.