> [!NOTE]
> **Note:**
>
> Filestore agent volumes are available under an Allowlisted GA (AGA)
> program. To request access for your Google Cloud project, submit the
> Filestore agent volumes
> [access request form](https://forms.gle/vYPkcFiZVoTjf7Ah7).
>
> The Agent Substrate integration with Filestore agent volumes is in Preview and doesn't support automation
> for Filestore volume snapshots, cloning, or data tiering.

If you run standard AI agent benchmarks, developer environments, or automated
pipeline workloads on Google Kubernetes Engine (GKE), you can use standard
Kubernetes `PersistentVolumeClaim` (PVC) and `Deployment` resources directly
with Filestore agent volumes.

This pattern uses familiar Kubernetes resource definitions without requiring
custom sandboxing controllers or `DaemonSet` resources.

## Before you begin

Complete the cluster and CSI driver setup in
[Set up GKE environment for Filestore agent volumes](https://docs.cloud.google.com/filestore/docs/use-filestore-agent-volumes-gke.md.txt).

## Create a PersistentVolumeClaim

Create a manifest named `agent-pvc.yaml` requesting storage from the
`volume-pool-sc` `StorageClass` you created earlier:

```yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: agent-workspace-pvc
  namespace: default
spec:
  accessModes:
    - ReadWriteMany
  storageClassName: volume-pool-sc
  resources:
    requests:
      storage: 1Gi
```

Apply the manifest:

```
kubectl apply -f agent-pvc.yaml
```

Verify that the PVC transitions to `Bound`:

```
kubectl get pvc agent-workspace-pvc
```

The output is similar to the following:

    NAME                  STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS     AGE
    agent-workspace-pvc   Bound    pvc-12345678-abcd-ef01-2345-6789abcdef01   1Gi        RWX            volume-pool-sc   5s

The Filestore CSI driver rapidly provisions a new volume within
your volume pool (typically in less than two seconds) and binds the PVC.

## Deploy an agent workload

Create a Deployment manifest named `agent-deployment.yaml` that mounts the
bound PVC:

```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: agent-worker
  namespace: default
  labels:
    app: agent-worker
spec:
  replicas: 1
  selector:
    matchLabels:
      app: agent-worker
  template:
    metadata:
      labels:
        app: agent-worker
    spec:
      containers:
        - name: worker
          image: busybox:latest
          command: ["/bin/sh", "-c"]
          args:
            - |
              echo "Agent worker started. Workspace mounted at /workspace:"
              ls -la /workspace
              echo "Writing benchmark results..."
              date > /workspace/run-status.txt
              cat /workspace/run-status.txt
              sleep infinity
          resources:
            requests:
              cpu: "250m"
              memory: "256Mi"
            limits:
              cpu: "500m"
              memory: "512Mi"
          volumeMounts:
            - name: workspace-storage
              mountPath: /workspace
      volumes:
        - name: workspace-storage
          persistentVolumeClaim:
            claimName: agent-workspace-pvc
```

Apply the manifest:

```
kubectl apply -f agent-deployment.yaml
```

## Verify the deployment and file access

1. Check that the deployment pod is running:

   ```
   kubectl get pods -l app=agent-worker
   ```

   The output is similar to the following:

   ```bash
   NAME                            READY   STATUS    RESTARTS   AGE
   agent-worker-6789bcdef-ghijk    1/1     Running   0          30s
   ```
2. Check container logs to confirm successful file operations:

   ```
   kubectl logs -l app=agent-worker -c worker
   ```

   The output is similar to the following:

   ```bash
   Agent worker started. Workspace mounted at /workspace:
   total 8
   drwxr-xr-x    2 root     root          4096 Sep 14 12:00 .
   drwxr-xr-x    1 root     root          4096 Sep 14 12:00 ..
   Writing benchmark results...
   Mon Sep 14 12:00:05 UTC 2026
   ```

Because Filestore agent volumes support `ReadWriteMany` (RWX)
access, multiple replicas or distinct pods can concurrently mount the same
PVC for collaborative agent workflows.

## What's next

- Explore [Agent Sandbox](https://docs.cloud.google.com/filestore/docs/agent-sandbox.md.txt).
- Configure [Agent Sandbox with dynamic storage late-binding](https://docs.cloud.google.com/filestore/docs/agent-sandbox-latebind.md.txt).
- Create and configure [volume pools](https://docs.cloud.google.com/filestore/docs/create-volume-pools.md.txt).