자체 관리 GKE 워크로드와 함께 Filestore 에이전트 볼륨 사용

Google Kubernetes Engine (GKE)에서 표준 AI 에이전트 벤치마크, 개발자 환경 또는 자동화된 파이프라인 워크로드를 실행하는 경우 Filestore 에이전트 볼륨과 함께 표준 Kubernetes PersistentVolumeClaim (PVC) 및 Deployment 리소스를 직접 사용할 수 있습니다.

이 패턴은 맞춤 샌드박스 컨트롤러나 DaemonSet 리소스가 필요하지 않고 친숙한 Kubernetes 리소스 정의를 사용합니다.

시작하기 전에

Filestore 에이전트 볼륨용 GKE 환경 설정에서 클러스터 및 CSI 드라이버 설정을 완료합니다.

PersistentVolumeClaim 만들기

이전에 만든 volume-pool-sc StorageClass에서 스토리지를 요청하는 agent-pvc.yaml이라는 매니페스트를 만듭니다.

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

매니페스트를 적용합니다.

kubectl apply -f agent-pvc.yaml

PVC가 Bound로 전환되는지 확인합니다.

kubectl get pvc agent-workspace-pvc

출력은 다음과 비슷합니다.

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

Filestore CSI 드라이버는 1초 이내에 볼륨 풀 내에 새 볼륨을 프로비저닝하고 PVC를 바인딩합니다.

에이전트 워크로드 배포

바인딩된 PVC를 마운트하는 agent-deployment.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

매니페스트를 적용합니다.

kubectl apply -f agent-deployment.yaml

배포 및 파일 액세스 확인

  1. 배포 포드가 실행 중인지 확인합니다.

    kubectl get pods -l app=agent-worker
    

    출력은 다음과 비슷합니다.

    NAME                            READY   STATUS    RESTARTS   AGE
    agent-worker-6789bcdef-ghijk    1/1     Running   0          30s
    
  2. 컨테이너 로그를 확인하여 파일 작업이 성공했는지 확인합니다.

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

    출력은 다음과 비슷합니다.

    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
    

Filestore 에이전트 볼륨은 ReadWriteMany (RWX) 액세스를 지원하므로 여러 복제본 또는 개별 포드가 공동 에이전트 워크플로를 위해 동일한 PVC를 동시에 마운트할 수 있습니다.

다음 단계