Skip to content

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.

  • A GKE cluster. Callers’ tokens are only ever sent to an https API 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.com below), and a certificate for it in Certificate Manager (step 2 creates one).
  • gcloud and kubectl pointed at the project and cluster.
Terminal window
export PROJECT=your-project
gcloud config set project "$PROJECT"

In the console, Google Auth Platform:

  1. The consent screen’s audience must be Internal, so cloud-platform needs no app verification. An Internal app needs no scopes listed under Data access: the data store requests them.
  2. Clients → Create client, type Web application, name lookout. Mark it as used by an AI-powered agent if the console asks.
  3. Authorized redirect URI: https://vertexaisearch.cloud.google.com/oauth-redirect
  4. 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.

lookout serves through a GKE Gateway (a global external Application Load Balancer) whose TLS comes from a Certificate Manager map.

Terminal window
gcloud compute addresses create lookout-mcp-ip --global
gcloud 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:

Terminal window
gcloud certificate-manager dns-authorizations create lookout-mcp --domain=lookout.example.com
gcloud 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-mcp
gcloud certificate-manager maps create lookout-mcp
gcloud certificate-manager maps entries create lookout-mcp \
--map=lookout-mcp --certificates=lookout-mcp --hostname=lookout.example.com

The certificate is issued once the CNAME resolves, usually within minutes; gcloud certificate-manager certificates describe lookout-mcp shows ACTIVE.

Fetch the overlay, edit config.yaml, and apply it:

Terminal window
git clone --depth 1 --branch vX.Y.Z https://github.com/go-steer/k8s-lookout
cd 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.Z
components:
- github.com/go-steer/k8s-lookout/deploy/mcp/domain?ref=vX.Y.Z
configMapGenerator:
- 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-ip

Either way it creates, in agent-triage:

  • a lookout-mcp ServiceAccount, with no RBAC and no Workload Identity;
  • two stateless lookout mcp replicas in Google-token mode, one per zone, serving the triage and audit tool profiles plus six incident reads (cluster health, recent changes, event timeline, resource spec, blast radius, resource top) — minus findings diff, which needs a store — with the access log on stdout;
  • a gke-l7-global-external-managed Gateway on lookout-mcp-ip, HTTPS only, an HTTPRoute for DOMAIN, 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:

Terminal window
curl -s https://lookout.example.com/.well-known/oauth-protected-resource/mcp

The 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.

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:...

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.

lookout reads as each person, so each person needs read access to what they will ask about, granted as usual:

  • Kubernetes: a view ClusterRole binding (or a namespaced Role) for their Google account or group, or an IAM role such as roles/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.list in each project, which roles/container.viewer includes) 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>.

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:

  1. Enable the Cloud Identity API and create the account:

    Terminal window
    gcloud services enable cloudidentity.googleapis.com
    gcloud iam service-accounts create lookout-groups
  2. Let lookout impersonate it. lookout’s principal is the lookout-mcp Kubernetes 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
  3. 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.

  4. 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.

  1. Gemini Enterprise → your app → Data stores → Create data store → Custom MCP Server → Add MCP server. Choose OAuth 2.0:

    FieldValue
    MCP Server URLhttps://lookout.example.com/mcp
    Authorization URLhttps://accounts.google.com/o/oauth2/v2/auth
    Authorization URL Parameters&access_type=offline&prompt=consent
    Token URLhttps://oauth2.googleapis.com/token
    Client ID / Client Secretfrom step 1
    Enable PKCE Supporton
    Scopesopenid email https://www.googleapis.com/auth/cloud-platform
  2. Verify Auth, and sign in with an account GOOGLE_ALLOW admits.

  3. 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.

  4. Create and wait for Active.

  5. 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.

  6. Actions → Reload custom actions, then enable the connector in the chat.

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:

Terminal window
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.

  • Who may call lookout: GOOGLE_ALLOW in config.yaml, then kubectl apply -k . and kubectl -n agent-triage rollout restart deploy/lookout-mcp. With a group: 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/--tools arguments in mcp.yaml (see MCP setup). Fewer tools means a cheaper, more accurate assistant.

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.