hi


Hi! How can I help you today?


'/home/ubuntu/pipecat' see we havr 2 dpeloyments i want u to revers the replicas .. v3 needs more .. and normal one less


Let me find the deployment configs.


pipecat/deployments/monitoring/setup-monitoring.sh:250:    echo -e "     • HPA at max replicas for 10+ min      → warning"
pipecat/deployments/monitoring/dashboards/maya-pipecat-overview.json:281:          "expr": "kube_horizontalpodautoscaler_status_current_replicas{horizontalpodautoscaler=\"maya-pipecat-hpa\"}",
pipecat/deployments/monitoring/dashboards/maya-pipecat-overview.json:286:          "expr": "kube_horizontalpodautoscaler_status_desired_replicas{horizontalpodautoscaler=\"maya-pipecat-hpa\"}",
pipecat/deployments/monitoring/dashboards/maya-pipecat-overview.json:291:          "expr": "kube_horizontalpodautoscaler_spec_min_replicas{horizontalpodautoscaler=\"maya-pipecat-hpa\"}",
pipecat/deployments/monitoring/dashboards/maya-pipecat-overview.json:296:          "expr": "kube_horizontalpodautoscaler_spec_max_replicas{horizontalpodautoscaler=\"maya-pipecat-hpa\"}",
pipecat/deployments/k8s/deployment-test.yaml:9:  replicas: 1
pipecat/deployments/monitoring/values.yaml:240:          # Alert: HPA at max replicas
pipecat/deployments/monitoring/values.yaml:242:            expr: kube_horizontalpodautoscaler_status_current_replicas{horizontalpodautoscaler="maya-pipecat-hpa"} >= kube_horizontalpodautoscaler_spec_max_replicas{horizontalpodautoscaler="maya-pipecat-hpa"}
pipecat/deployments/monitoring/values.yaml:247:              summary: "HPA maya-pipecat-hpa is at max replicas"
pipecat/deployments/monitoring/values.yaml:248:              description: "HPA has been at maximum ({{ $value }} pods) for 10+ minutes. Consider increasing max replicas."
pipecat/deployments/k8s/gke/deployment.yaml:8:  replicas: 90
pipecat/.cursorrules/pipecat.mdc:778:min_replicas = 1
pipecat/.cursorrules/pipecat.mdc:779:max_replicas = 5
pipecat/deployments/k8s/gke/deployment-v3.yaml:8:  replicas: 5
pipecat/deployments/k8s/gke/datadog-daemonset.yaml:138:  resources: ["deployments", "replicasets", "daemonsets", "statefulsets"]
pipecat/deployments/k8s/datadog-daemonset.yaml:150:  resources: ["deployments", "replicasets", "daemonsets", "statefulsets"]
pipecat/deployments/k8s/deployment.yaml:8:  replicas: 90


Found them. The GKE deployments:
- `deployment.yaml` (normal): **90 replicas**
- `deployment-v3.yaml` (v3): **5 replicas**

I'll swap them — v3 gets 90, normal gets 5.


<tool_use_error>File has not been read yet. Read it first before writing to it.</tool_use_error>

Error: File has not been read yet. Read it first before writing to it.


     1→apiVersion: apps/v1
     2→kind: Deployment
     3→metadata:
     4→  name: maya-pipecat
     5→  labels:
     6→    app: maya-pipecat
     7→spec:
     8→  replicas: 90
     9→  strategy:
    10→    type: RollingUpdate
    11→    rollingUpdate:
    12→      maxSurge: 25%
    13→      maxUnavailable: 0   # Graceful: don't terminate old pods until new ones are ready
    14→  selector:
    15→    matchLabels:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: maya-pipecat
  labels:
    app: maya-pipecat
spec:
  replicas: 90
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 0   # Graceful: don't terminate old pods until new ones are ready
  selector:
    matchLabels:


     1→apiVersion: apps/v1
     2→kind: Deployment
     3→metadata:
     4→  name: maya-pipecat-v3
     5→  labels:
     6→    app: maya-pipecat-v3
     7→spec:
     8→  replicas: 5
     9→  strategy:
    10→    type: RollingUpdate
    11→    rollingUpdate:
    12→      maxSurge: 25%
    13→      maxUnavailable: 0
    14→  selector:
    15→    matchLabels:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: maya-pipecat-v3
  labels:
    app: maya-pipecat-v3
spec:
  replicas: 5
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 0
  selector:
    matchLabels:


The file /home/ubuntu/pipecat/deployments/k8s/gke/deployment.yaml has been updated successfully.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: maya-pipecat
  labels:
    app: maya-pipecat
spec:
  replicas: 90
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 0   # Graceful: don't terminate old pods until new ones are ready
  selector:
    matchLabels:
      app: maya-pipecat
  template:
    metadata:
      labels:
        app: maya-pipecat
      annotations:
        ad.datadoghq.com/maya-pipecat.logs: |
          [{
            "source": "maya-pipecat",
            "service": "maya-pipecat",
            "log_processing_rules": [
              {
                "type": "exclude_at_match",
                "name": "exclude_noise",
                "pattern": "Failed to send LogLine|ResponseCanceled|Metrics failed to get snapshot|daily_core|daily_common_utils|epoll_wait: Invalid argument|epoll_wait: Bad file descriptor|TrySendError|Disconnected|CallManagerEventSfuSigPresence|SignalSendFailed|MessageSendFailed|took longer than 2s"
              }
            ]
          }]
    spec:
      terminationGracePeriodSeconds: 90   # Time for gunicorn to drain in-flight requests on SIGTERM
      imagePullSecrets:
      - name: ar-pull-secret
      containers:
      - name: maya-pipecat
        image: asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat:latest
        imagePullPolicy: Always
        lifecycle:
          preStop:
            exec:
              command: ["/bin/sh", "-c", "sleep 15"]
        ports:
        - containerPort: 3008
        resources:
          requests:
            memory: "3Gi"
            cpu: "2000m"
          limits:
            memory: "12Gi"
            cpu: "8000m"
        livenessProbe:
          httpGet:
            path: /health
            port: 3008
          initialDelaySeconds: 30
          periodSeconds: 15
          timeoutSeconds: 15
        readinessProbe:
          httpGet:
            path: /ready
            port: 3008
          initialDelaySeconds: 15
          periodSeconds: 15
          timeoutSeconds: 10
          failureThreshold: 3
          successThreshold: 1
        envFrom:
        - secretRef:
            name: maya-env-secrets
        env:
        - name: DD_AGENT_HOST
          valueFrom:
            fieldRef:
              fieldPath: status.hostIP
        - name: REDIS_ENABLED
          value: "true"
        - name: REDIS_URL
          valueFrom:
            secretKeyRef:
              name: maya-redis-secret
              key: redis-url
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        volumeMounts:
        - name: gcp-creds
          mountPath: /app/gcp-service-account.json
          subPath: gcp-service-account.json
          readOnly: true
        - name: gcp-creds
          mountPath: /app/gcp-new-service-account.json
          subPath: gcp-new-service-account.json
          readOnly: true
      volumes:
      - name: gcp-creds
        secret:
          secretName: gcp-credentials
---
apiVersion: v1
kind: Service
metadata:
  name: maya-pipecat
  labels:
    app: maya-pipecat
spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 3008
    protocol: TCP
  selector:
    app: maya-pipecat
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: maya-pipecat-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: maya-pipecat
  minReplicas: 30
  maxReplicas: 120
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70
  - type: Resource
    resource:
      name: memory
      target:
        type: Utilization
        averageUtilization: 80
  behavior:
    scaleUp:
      stabilizationWindowSeconds: 15
      policies:
      - type: Pods
        value: 4
        periodSeconds: 15
    scaleDown:
      stabilizationWindowSeconds: 300
      policies:
      - type: Pods
        value: 1
        periodSeconds: 60

labels:
app: maya-pipecat
spec:
-  replicas: 90
+  replicas: 5
strategy:
type: RollingUpdate
rollingUpdate:


The file /home/ubuntu/pipecat/deployments/k8s/gke/deployment-v3.yaml has been updated successfully.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: maya-pipecat-v3
  labels:
    app: maya-pipecat-v3
spec:
  replicas: 5
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 0
  selector:
    matchLabels:
      app: maya-pipecat-v3
  template:
    metadata:
      labels:
        app: maya-pipecat-v3
      annotations:
        ad.datadoghq.com/maya-pipecat-v3.logs: |
          [{
            "source": "maya-pipecat-v3",
            "service": "maya-pipecat-v3",
            "log_processing_rules": [
              {
                "type": "exclude_at_match",
                "name": "exclude_noise",
                "pattern": "Failed to send LogLine|ResponseCanceled|Metrics failed to get snapshot|daily_core|daily_common_utils|epoll_wait: Invalid argument|epoll_wait: Bad file descriptor|TrySendError|Disconnected|CallManagerEventSfuSigPresence|SignalSendFailed|MessageSendFailed|took longer than 2s"
              }
            ]
          }]
    spec:
      terminationGracePeriodSeconds: 90
      imagePullSecrets:
      - name: ar-pull-secret
      containers:
      - name: maya-pipecat-v3
        image: asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v3:latest
        imagePullPolicy: Always
        lifecycle:
          preStop:
            exec:
              command: ["/bin/sh", "-c", "sleep 15"]
        ports:
        - containerPort: 3008
        resources:
          requests:
            memory: "3Gi"
            cpu: "2000m"
          limits:
            memory: "12Gi"
            cpu: "8000m"
        livenessProbe:
          httpGet:
            path: /api/v3/health
            port: 3008
          initialDelaySeconds: 30
          periodSeconds: 15
          timeoutSeconds: 15
        readinessProbe:
          httpGet:
            path: /api/v3/ready
            port: 3008
          initialDelaySeconds: 15
          periodSeconds: 15
          timeoutSeconds: 10
          failureThreshold: 3
          successThreshold: 1
        envFrom:
        - secretRef:
            name: maya-env-secrets
        env:
        - name: DD_AGENT_HOST
          valueFrom:
            fieldRef:
              fieldPath: status.hostIP
        - name: REDIS_ENABLED
          value: "true"
        - name: REDIS_URL
          valueFrom:
            secretKeyRef:
              name: maya-redis-secret
              key: redis-url
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        volumeMounts:
        - name: gcp-creds
          mountPath: /app/gcp-service-account.json
          subPath: gcp-service-account.json
          readOnly: true
        - name: gcp-creds
          mountPath: /app/gcp-new-service-account.json
          subPath: gcp-new-service-account.json
          readOnly: true
      volumes:
      - name: gcp-creds
        secret:
          secretName: gcp-credentials
---
apiVersion: v1
kind: Service
metadata:
  name: maya-pipecat-v3
  labels:
    app: maya-pipecat-v3
spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 3008
    protocol: TCP
  selector:
    app: maya-pipecat-v3
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: maya-pipecat-v3-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: maya-pipecat-v3
  minReplicas: 5
  maxReplicas: 30
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70
  - type: Resource
    resource:
      name: memory
      target:
        type: Utilization
        averageUtilization: 80
  behavior:
    scaleUp:
      stabilizationWindowSeconds: 15
      policies:
      - type: Pods
        value: 4
        periodSeconds: 15
    scaleDown:
      stabilizationWindowSeconds: 300
      policies:
      - type: Pods
        value: 1
        periodSeconds: 60

labels:
app: maya-pipecat-v3
spec:
-  replicas: 5
+  replicas: 90
strategy:
type: RollingUpdate
rollingUpdate:


Done. Swapped the replicas:
- **maya-pipecat** (normal): 90 → **5**
- **maya-pipecat-v3**: 5 → **90**


manually adjust deployments in cluster for now .. dont do redploy from docker building up


Bash

kubectl apply -f /home/ubuntu/pipecat/deployments/k8s/gke/deployment.yaml && kubectl apply -f /home/ubuntu/pipecat/deployments/k8s/gke/deployment-v3.yaml

Apply updated replica counts to cluster without rebuilding


Error: Exit code 1
F0327 07:24:18.843821  849273 cred.go:145] print credential failed with error: Failed to retrieve access token:: failure while executing gcloud, with args [config config-helper --format=json]: exit status 1 (err: ERROR: (gcloud.config.config-helper) There was a problem refreshing your current auth tokens: Reauthentication failed. cannot prompt during non-interactive execution.
Please run:

  $ gcloud auth login

to obtain new credentials.

If you have already logged in with a different account, run:

  $ gcloud config set account ACCOUNT

to select an already authenticated account to use.
)
F0327 07:24:19.620640  849374 cred.go:145] print credential failed with error: Failed to retrieve access token:: failure while executing gcloud, with args [config config-helper --format=json]: exit status 1 (err: ERROR: (gcloud.config.config-helper) There was a problem refreshing your current auth tokens: Reauthentication failed. cannot prompt during non-interactive execution.
Please run:

  $ gcloud auth login

to obtain new credentials.

If you have already logged in with a different account, run:

  $ gcloud config set account ACCOUNT

to select an already authenticated account to use.
)
error: error validating "/home/ubuntu/pipecat/deployments/k8s/gke/deployment.yaml": error validating data: failed to download openapi: Get "https://34.14.153.57/openapi/v2?timeout=32s": getting credentials: exec: executable gke-gcloud-auth-plugin failed with exit code 1; if you choose to ignore these errors, turn validation off with --validate=false


Your gcloud auth has expired. You'll need to re-authenticate first. Run this:

```
! gcloud auth login
```

Then I can apply the deployments.


done


kubectl apply -f /home/ubuntu/pipecat/deployments/k8s/gke/deployment.yaml && kubectl apply -f /home/ubuntu/pipecat/deployments/k8s/gke/deployment-v3.yaml

Apply updated replica counts to cluster


deployment.apps/maya-pipecat configured
service/maya-pipecat unchanged
horizontalpodautoscaler.autoscaling/maya-pipecat-hpa unchanged
deployment.apps/maya-pipecat-v3 configured
service/maya-pipecat-v3 unchanged
horizontalpodautoscaler.autoscaling/maya-pipecat-v3-hpa unchanged


Both deployments updated in the cluster. maya-pipecat scaling down to 5 and maya-pipecat-v3 scaling up to 90. You can watch the rollout with `kubectl get pods` if needed.


check the pod counts


kubectl get deployments maya-pipecat maya-pipecat-v3

Check deployment replica counts


NAME              READY   UP-TO-DATE   AVAILABLE   AGE
maya-pipecat      5/5     5            5           35d
maya-pipecat-v3   90/90   90           90          8h


All pods are ready:
- **maya-pipecat**: 5/5
- **maya-pipecat-v3**: 90/90


can u do 30 maya-pipecat and 60 v3


kubectl scale deployment maya-pipecat --replicas=30 && kubectl scale deployment maya-pipecat-v3 --replicas=60

Scale deployments to 30 and 60 replicas


deployment.apps/maya-pipecat scaled
deployment.apps/maya-pipecat-v3 scaled


apiVersion: apps/v1
kind: Deployment
metadata:
  name: maya-pipecat
  labels:
    app: maya-pipecat
spec:
  replicas: 5
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 0   # Graceful: don't terminate old pods until new ones are ready
  selector:
    matchLabels:
      app: maya-pipecat
  template:
    metadata:
      labels:
        app: maya-pipecat
      annotations:
        ad.datadoghq.com/maya-pipecat.logs: |
          [{
            "source": "maya-pipecat",
            "service": "maya-pipecat",
            "log_processing_rules": [
              {
                "type": "exclude_at_match",
                "name": "exclude_noise",
                "pattern": "Failed to send LogLine|ResponseCanceled|Metrics failed to get snapshot|daily_core|daily_common_utils|epoll_wait: Invalid argument|epoll_wait: Bad file descriptor|TrySendError|Disconnected|CallManagerEventSfuSigPresence|SignalSendFailed|MessageSendFailed|took longer than 2s"
              }
            ]
          }]
    spec:
      terminationGracePeriodSeconds: 90   # Time for gunicorn to drain in-flight requests on SIGTERM
      imagePullSecrets:
      - name: ar-pull-secret
      containers:
      - name: maya-pipecat
        image: asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat:latest
        imagePullPolicy: Always
        lifecycle:
          preStop:
            exec:
              command: ["/bin/sh", "-c", "sleep 15"]
        ports:
        - containerPort: 3008
        resources:
          requests:
            memory: "3Gi"
            cpu: "2000m"
          limits:
            memory: "12Gi"
            cpu: "8000m"
        livenessProbe:
          httpGet:
            path: /health
            port: 3008
          initialDelaySeconds: 30
          periodSeconds: 15
          timeoutSeconds: 15
        readinessProbe:
          httpGet:
            path: /ready
            port: 3008
          initialDelaySeconds: 15
          periodSeconds: 15
          timeoutSeconds: 10
          failureThreshold: 3
          successThreshold: 1
        envFrom:
        - secretRef:
            name: maya-env-secrets
        env:
        - name: DD_AGENT_HOST
          valueFrom:
            fieldRef:
              fieldPath: status.hostIP
        - name: REDIS_ENABLED
          value: "true"
        - name: REDIS_URL
          valueFrom:
            secretKeyRef:
              name: maya-redis-secret
              key: redis-url
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        volumeMounts:
        - name: gcp-creds
          mountPath: /app/gcp-service-account.json
          subPath: gcp-service-account.json
          readOnly: true
        - name: gcp-creds
          mountPath: /app/gcp-new-service-account.json
          subPath: gcp-new-service-account.json
          readOnly: true
      volumes:
      - name: gcp-creds
        secret:
          secretName: gcp-credentials
---
apiVersion: v1
kind: Service
metadata:
  name: maya-pipecat
  labels:
    app: maya-pipecat
spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 3008
    protocol: TCP
  selector:
    app: maya-pipecat
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: maya-pipecat-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: maya-pipecat
  minReplicas: 30
  maxReplicas: 120
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70
  - type: Resource
    resource:
      name: memory
      target:
        type: Utilization
        averageUtilization: 80
  behavior:
    scaleUp:
      stabilizationWindowSeconds: 15
      policies:
      - type: Pods
        value: 4
        periodSeconds: 15
    scaleDown:
      stabilizationWindowSeconds: 300
      policies:
      - type: Pods
        value: 1
        periodSeconds: 60

labels:
app: maya-pipecat
spec:
-  replicas: 5
+  replicas: 30
strategy:
type: RollingUpdate
rollingUpdate:


apiVersion: apps/v1
kind: Deployment
metadata:
  name: maya-pipecat-v3
  labels:
    app: maya-pipecat-v3
spec:
  replicas: 90
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 0
  selector:
    matchLabels:
      app: maya-pipecat-v3
  template:
    metadata:
      labels:
        app: maya-pipecat-v3
      annotations:
        ad.datadoghq.com/maya-pipecat-v3.logs: |
          [{
            "source": "maya-pipecat-v3",
            "service": "maya-pipecat-v3",
            "log_processing_rules": [
              {
                "type": "exclude_at_match",
                "name": "exclude_noise",
                "pattern": "Failed to send LogLine|ResponseCanceled|Metrics failed to get snapshot|daily_core|daily_common_utils|epoll_wait: Invalid argument|epoll_wait: Bad file descriptor|TrySendError|Disconnected|CallManagerEventSfuSigPresence|SignalSendFailed|MessageSendFailed|took longer than 2s"
              }
            ]
          }]
    spec:
      terminationGracePeriodSeconds: 90
      imagePullSecrets:
      - name: ar-pull-secret
      containers:
      - name: maya-pipecat-v3
        image: asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v3:latest
        imagePullPolicy: Always
        lifecycle:
          preStop:
            exec:
              command: ["/bin/sh", "-c", "sleep 15"]
        ports:
        - containerPort: 3008
        resources:
          requests:
            memory: "3Gi"
            cpu: "2000m"
          limits:
            memory: "12Gi"
            cpu: "8000m"
        livenessProbe:
          httpGet:
            path: /api/v3/health
            port: 3008
          initialDelaySeconds: 30
          periodSeconds: 15
          timeoutSeconds: 15
        readinessProbe:
          httpGet:
            path: /api/v3/ready
            port: 3008
          initialDelaySeconds: 15
          periodSeconds: 15
          timeoutSeconds: 10
          failureThreshold: 3
          successThreshold: 1
        envFrom:
        - secretRef:
            name: maya-env-secrets
        env:
        - name: DD_AGENT_HOST
          valueFrom:
            fieldRef:
              fieldPath: status.hostIP
        - name: REDIS_ENABLED
          value: "true"
        - name: REDIS_URL
          valueFrom:
            secretKeyRef:
              name: maya-redis-secret
              key: redis-url
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        volumeMounts:
        - name: gcp-creds
          mountPath: /app/gcp-service-account.json
          subPath: gcp-service-account.json
          readOnly: true
        - name: gcp-creds
          mountPath: /app/gcp-new-service-account.json
          subPath: gcp-new-service-account.json
          readOnly: true
      volumes:
      - name: gcp-creds
        secret:
          secretName: gcp-credentials
---
apiVersion: v1
kind: Service
metadata:
  name: maya-pipecat-v3
  labels:
    app: maya-pipecat-v3
spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 3008
    protocol: TCP
  selector:
    app: maya-pipecat-v3
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: maya-pipecat-v3-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: maya-pipecat-v3
  minReplicas: 5
  maxReplicas: 30
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70
  - type: Resource
    resource:
      name: memory
      target:
        type: Utilization
        averageUtilization: 80
  behavior:
    scaleUp:
      stabilizationWindowSeconds: 15
      policies:
      - type: Pods
        value: 4
        periodSeconds: 15
    scaleDown:
      stabilizationWindowSeconds: 300
      policies:
      - type: Pods
        value: 1
        periodSeconds: 60

labels:
app: maya-pipecat-v3
spec:
-  replicas: 90
+  replicas: 60
strategy:
type: RollingUpdate
rollingUpdate:


Done. Scaled in cluster and updated the yaml files:
- **maya-pipecat**: 30
- **maya-pipecat-v3**: 60


rollout change


kubectl rollout status deployment maya-pipecat --timeout=120s & kubectl rollout status deployment maya-pipecat-v3 --timeout=120s & wait

Check rollout status for both deployments


deployment "maya-pipecat" successfully rolled out
[1]-  Done                    kubectl rollout status deployment maya-pipecat --timeout=120s
deployment "maya-pipecat-v3" successfully rolled out
[2]+  Done                    kubectl rollout status deployment maya-pipecat-v3 --timeout=120s


Both deployments have successfully rolled out.


deploy v3


kubectl rollout restart deployment maya-pipecat-v3

Restart v3 deployment to trigger rolling update


The user doesn't want to proceed with this tool use. The tool use was rejected (eg. if it was a file edit, the new_string was NOT written to the file). STOP what you are doing and wait for the user to tell you how to proceed.


[Request interrupted by user for tool use]


<local-command-caveat>Caveat: The messages below were generated by the user while running local commands. DO NOT respond to these messages or otherwise consider them in your response unless the user explicitly asks you to.</local-command-caveat>


<command-name>/exit</command-name>
            <command-message>exit</command-message>
            <command-args></command-args>


<local-command-stdout>Bye!</local-command-stdout>


No response requested.


what is normal and v3 pods share give it


Please run /login · API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."},"request_id":"req_011CZU8geuqwEeWTsqSvru5j"}


<local-command-stdout>Goodbye!</local-command-stdout>


Based on what we set:

- **maya-pipecat** (normal): 30 pods → **33%**
- **maya-pipecat-v3**: 60 pods → **67%**

Total: 90 pods.


i want u to pull git reove we haev new branch called v4_version .. we need to deploy that to .. normal-20% and v4_version-10% and remoainig v3


The user wants to:
1. Pull from git
2. There's a new branch called v4_version
3. Deploy with: normal (20%), v4_version (10%), v3 (remaining 70%)
4. Total 90 pods: normal=18, v4=9, v3=63

Let me first pull and check the branch.


So out of 90 pods: normal=18 (20%), v4=9 (10%), v3=63 (70%).

Let me pull and check the v4 branch first.


cd /home/ubuntu/pipecat && git fetch --all && git branch -a | grep v4

Fetch and find v4 branch


Fetching origin
From https://github.com/MayaResearch/pipecat
   25d5966..fdcbbf0  v3_version -> origin/v3_version
 * [new branch]      v4_version -> origin/v4_version
  remotes/origin/v4_version


Found it. Let me check if there's already a v4 deployment yaml, and look at the v3 one as a template.


No files found


     1→apiVersion: apps/v1
     2→kind: Deployment
     3→metadata:
     4→  name: maya-pipecat-v3
     5→  labels:
     6→    app: maya-pipecat-v3
     7→spec:
     8→  replicas: 60
     9→  strategy:
    10→    type: RollingUpdate
    11→    rollingUpdate:
    12→      maxSurge: 25%
    13→      maxUnavailable: 0
    14→  selector:
    15→    matchLabels:
    16→      app: maya-pipecat-v3
    17→  template:
    18→    metadata:
    19→      labels:
    20→        app: maya-pipecat-v3
    21→      annotations:
    22→        ad.datadoghq.com/maya-pipecat-v3.logs: |
    23→          [{
    24→            "source": "maya-pipecat-v3",
    25→            "service": "maya-pipecat-v3",
    26→            "log_processing_rules": [
    27→              {
    28→                "type": "exclude_at_match",
    29→                "name": "exclude_noise",
    30→                "pattern": "Failed to send LogLine|ResponseCanceled|Metrics failed to get snapshot|daily_core|daily_common_utils|epoll_wait: Invalid argument|epoll_wait: Bad file descriptor|TrySendError|Disconnected|CallManagerEventSfuSigPresence|SignalSendFailed|MessageSendFailed|took longer than 2s"
    31→              }
    32→            ]
    33→          }]
    34→    spec:
    35→      terminationGracePeriodSeconds: 90
    36→      imagePullSecrets:
    37→      - name: ar-pull-secret
    38→      containers:
    39→      - name: maya-pipecat-v3
    40→        image: asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v3:latest
    41→        imagePullPolicy: Always
    42→        lifecycle:
    43→          preStop:
    44→            exec:
    45→              command: ["/bin/sh", "-c", "sleep 15"]
    46→        ports:
    47→        - containerPort: 3008
    48→        resources:
    49→          requests:
    50→            memory: "3Gi"
    51→            cpu: "2000m"
    52→          limits:
    53→            memory: "12Gi"
    54→            cpu: "8000m"
    55→        livenessProbe:
    56→          httpGet:
    57→            path: /api/v3/health
    58→            port: 3008
    59→          initialDelaySeconds: 30
    60→          periodSeconds: 15
    61→          timeoutSeconds: 15
    62→        readinessProbe:
    63→          httpGet:
    64→            path: /api/v3/ready
    65→            port: 3008
    66→          initialDelaySeconds: 15
    67→          periodSeconds: 15
    68→          timeoutSeconds: 10
    69→          failureThreshold: 3
    70→          successThreshold: 1
    71→        envFrom:
    72→        - secretRef:
    73→            name: maya-env-secrets
    74→        env:
    75→        - name: DD_AGENT_HOST
    76→          valueFrom:
    77→            fieldRef:
    78→              fieldPath: status.hostIP
    79→        - name: REDIS_ENABLED
    80→          value: "true"
    81→        - name: REDIS_URL
    82→          valueFrom:
    83→            secretKeyRef:
    84→              name: maya-redis-secret
    85→              key: redis-url
    86→        - name: POD_NAME
    87→          valueFrom:
    88→            fieldRef:
    89→              fieldPath: metadata.name
    90→        volumeMounts:
    91→        - name: gcp-creds
    92→          mountPath: /app/gcp-service-account.json
    93→          subPath: gcp-service-account.json
    94→          readOnly: true
    95→        - name: gcp-creds
    96→          mountPath: /app/gcp-new-service-account.json
    97→          subPath: gcp-new-service-account.json
    98→          readOnly: true
    99→      volumes:
   100→      - name: gcp-creds
   101→        secret:
   102→          secretName: gcp-credentials
   103→---
   104→apiVersion: v1
   105→kind: Service
   106→metadata:
   107→  name: maya-pipecat-v3
   108→  labels:
   109→    app: maya-pipecat-v3
   110→spec:
   111→  type: NodePort
   112→  ports:
   113→  - port: 80
   114→    targetPort: 3008
   115→    protocol: TCP
   116→  selector:
   117→    app: maya-pipecat-v3
   118→---
   119→apiVersion: autoscaling/v2
   120→kind: HorizontalPodAutoscaler
   121→metadata:
   122→  name: maya-pipecat-v3-hpa
   123→spec:
   124→  scaleTargetRef:
   125→    apiVersion: apps/v1
   126→    kind: Deployment
   127→    name: maya-pipecat-v3
   128→  minReplicas: 5
   129→  maxReplicas: 30
   130→  metrics:
   131→  - type: Resource
   132→    resource:
   133→      name: cpu
   134→      target:
   135→        type: Utilization
   136→        averageUtilization: 70
   137→  - type: Resource
   138→    resource:
   139→      name: memory
   140→      target:
   141→        type: Utilization
   142→        averageUtilization: 80
   143→  behavior:
   144→    scaleUp:
   145→      stabilizationWindowSeconds: 15
   146→      policies:
   147→      - type: Pods
   148→        value: 4
   149→        periodSeconds: 15
   150→    scaleDown:
   151→      stabilizationWindowSeconds: 300
   152→      policies:
   153→      - type: Pods
   154→        value: 1
   155→        periodSeconds: 60
   156→

apiVersion: apps/v1
kind: Deployment
metadata:
  name: maya-pipecat-v3
  labels:
    app: maya-pipecat-v3
spec:
  replicas: 60
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 0
  selector:
    matchLabels:
      app: maya-pipecat-v3
  template:
    metadata:
      labels:
        app: maya-pipecat-v3
      annotations:
        ad.datadoghq.com/maya-pipecat-v3.logs: |
          [{
            "source": "maya-pipecat-v3",
            "service": "maya-pipecat-v3",
            "log_processing_rules": [
              {
                "type": "exclude_at_match",
                "name": "exclude_noise",
                "pattern": "Failed to send LogLine|ResponseCanceled|Metrics failed to get snapshot|daily_core|daily_common_utils|epoll_wait: Invalid argument|epoll_wait: Bad file descriptor|TrySendError|Disconnected|CallManagerEventSfuSigPresence|SignalSendFailed|MessageSendFailed|took longer than 2s"
              }
            ]
          }]
    spec:
      terminationGracePeriodSeconds: 90
      imagePullSecrets:
      - name: ar-pull-secret
      containers:
      - name: maya-pipecat-v3
        image: asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v3:latest
        imagePullPolicy: Always
        lifecycle:
          preStop:
            exec:
              command: ["/bin/sh", "-c", "sleep 15"]
        ports:
        - containerPort: 3008
        resources:
          requests:
            memory: "3Gi"
            cpu: "2000m"
          limits:
            memory: "12Gi"
            cpu: "8000m"
        livenessProbe:
          httpGet:
            path: /api/v3/health
            port: 3008
          initialDelaySeconds: 30
          periodSeconds: 15
          timeoutSeconds: 15
        readinessProbe:
          httpGet:
            path: /api/v3/ready
            port: 3008
          initialDelaySeconds: 15
          periodSeconds: 15
          timeoutSeconds: 10
          failureThreshold: 3
          successThreshold: 1
        envFrom:
        - secretRef:
            name: maya-env-secrets
        env:
        - name: DD_AGENT_HOST
          valueFrom:
            fieldRef:
              fieldPath: status.hostIP
        - name: REDIS_ENABLED
          value: "true"
        - name: REDIS_URL
          valueFrom:
            secretKeyRef:
              name: maya-redis-secret
              key: redis-url
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        volumeMounts:
        - name: gcp-creds
          mountPath: /app/gcp-service-account.json
          subPath: gcp-service-account.json
          readOnly: true
        - name: gcp-creds
          mountPath: /app/gcp-new-service-account.json
          subPath: gcp-new-service-account.json
          readOnly: true
      volumes:
      - name: gcp-creds
        secret:
          secretName: gcp-credentials
---
apiVersion: v1
kind: Service
metadata:
  name: maya-pipecat-v3
  labels:
    app: maya-pipecat-v3
spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 3008
    protocol: TCP
  selector:
    app: maya-pipecat-v3
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: maya-pipecat-v3-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: maya-pipecat-v3
  minReplicas: 5
  maxReplicas: 30
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70
  - type: Resource
    resource:
      name: memory
      target:
        type: Utilization
        averageUtilization: 80
  behavior:
    scaleUp:
      stabilizationWindowSeconds: 15
      policies:
      - type: Pods
        value: 4
        periodSeconds: 15
    scaleDown:
      stabilizationWindowSeconds: 300
      policies:
      - type: Pods
        value: 1
        periodSeconds: 60


Now let me create the v4 deployment yaml and update replica counts. First, need to check what branch the v4 docker image would use — let me check if there's a CI/CD or Dockerfile setup.


Agent

Find v4 Docker/CI setup

Prompt: In /home/ubuntu/pipecat, look at the CI/CD pipeline or Dockerfile setup to understand how docker images are built and tagged for different branches (v3_version, v4_version). Check files like Dockerfile, cloudbuild.yaml, github actions, or any build scripts. I need to know the image naming convention so I can create a v4 deployment. The v3 image is: asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v3:latest. Just report what you find.


There's an issue with the selected model (claude-haiku-4-5@20251001). It may not exist or you may not have access to it. Run /model to pick a different model.

Prompt: In /home/ubuntu/pipecat, look at the CI/CD pipeline or Dockerfile setup to understand how docker images are built and tagged for different branches (v3_version, v4_version). Check files like Dockerfile, cloudbuild.yaml, github actions, or any build scripts. I need to know the image naming convention so I can create a v4 deployment. The v3 image is: asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v3:latest. Just report what you find.


Found 3 files
deployments/k8s/gke/deploy-v3.sh
deployments/k8s/gke/deploy.sh
deployments/k8s/deploy.sh


     1→#!/bin/bash
     2→set -e
     3→
     4→# ============================================
     5→# Maya Pipecat V3 - GKE Build, Push & Deploy
     6→# Image: asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v3
     7→# Deploys v3 backend alongside legacy maya-pipecat in the same cluster
     8→# ============================================
     9→
    10→IMAGE_URI="asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v3"
    11→IMAGE_TAG="${1:-latest}"
    12→
    13→SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
    14→PROJECT_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"
    15→
    16→echo "============================================"
    17→echo "Maya Pipecat V3 GKE Deployment"
    18→echo "============================================"
    19→echo "Image: ${IMAGE_URI}:${IMAGE_TAG}"
    20→echo "Project root: ${PROJECT_ROOT}"
    21→echo "============================================"
    22→
    23→# Step 1: Build
    24→echo ""
    25→echo "Building Docker image..."
    26→cd "$PROJECT_ROOT"
    27→docker build -t "${IMAGE_URI}:${IMAGE_TAG}" -f deployments/docker/Dockerfile .
    28→
    29→# Step 2: Configure Docker for Artifact Registry
    30→echo ""
    31→echo "Configuring Docker for Artifact Registry..."
    32→gcloud auth configure-docker asia-south1-docker.pkg.dev --quiet
    33→
    34→# Step 3: Push
    35→echo ""
    36→echo "Pushing image..."
    37→docker push "${IMAGE_URI}:${IMAGE_TAG}"
    38→
    39→# Step 4: Apply v3 deployment + service + HPA
    40→echo ""
    41→echo "Applying v3 deployment..."
    42→kubectl apply -f "${SCRIPT_DIR}/deployment-v3.yaml"
    43→
    44→# Step 5: Update ingress with v3 routing
    45→echo ""
    46→echo "Updating ingress..."
    47→kubectl apply -f "${SCRIPT_DIR}/ingress.yaml"
    48→
    49→# Step 6: Restart rollout
    50→echo ""
    51→echo "Restarting v3 deployment rollout..."
    52→kubectl rollout restart deployment/maya-pipecat-v3
    53→
    54→echo ""
    55→echo "Waiting for rollout..."
    56→kubectl rollout status deployment/maya-pipecat-v3 --timeout=300s
    57→
    58→echo ""
    59→echo "============================================"
    60→echo "V3 Deployment complete!"
    61→echo "============================================"
    62→kubectl get pods -l app=maya-pipecat-v3
    63→

#!/bin/bash
set -e

# ============================================
# Maya Pipecat V3 - GKE Build, Push & Deploy
# Image: asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v3
# Deploys v3 backend alongside legacy maya-pipecat in the same cluster
# ============================================

IMAGE_URI="asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v3"
IMAGE_TAG="${1:-latest}"

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"

echo "============================================"
echo "Maya Pipecat V3 GKE Deployment"
echo "============================================"
echo "Image: ${IMAGE_URI}:${IMAGE_TAG}"
echo "Project root: ${PROJECT_ROOT}"
echo "============================================"

# Step 1: Build
echo ""
echo "Building Docker image..."
cd "$PROJECT_ROOT"
docker build -t "${IMAGE_URI}:${IMAGE_TAG}" -f deployments/docker/Dockerfile .

# Step 2: Configure Docker for Artifact Registry
echo ""
echo "Configuring Docker for Artifact Registry..."
gcloud auth configure-docker asia-south1-docker.pkg.dev --quiet

# Step 3: Push
echo ""
echo "Pushing image..."
docker push "${IMAGE_URI}:${IMAGE_TAG}"

# Step 4: Apply v3 deployment + service + HPA
echo ""
echo "Applying v3 deployment..."
kubectl apply -f "${SCRIPT_DIR}/deployment-v3.yaml"

# Step 5: Update ingress with v3 routing
echo ""
echo "Updating ingress..."
kubectl apply -f "${SCRIPT_DIR}/ingress.yaml"

# Step 6: Restart rollout
echo ""
echo "Restarting v3 deployment rollout..."
kubectl rollout restart deployment/maya-pipecat-v3

echo ""
echo "Waiting for rollout..."
kubectl rollout status deployment/maya-pipecat-v3 --timeout=300s

echo ""
echo "============================================"
echo "V3 Deployment complete!"
echo "============================================"
kubectl get pods -l app=maya-pipecat-v3


Good. The pattern is clear. Now I'll create the v4 deployment yaml and deploy script based on v3. Let me also update the replica counts.


Write

apiVersion: apps/v1
kind: Deployment
metadata:
  name: maya-pipecat-v4
  labels:
    app: maya-pipecat-v4
spec:
  replicas: 9
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 0
  selector:
    matchLabels:
      app: maya-pipecat-v4
  template:
    metadata:
      labels:
        app: maya-pipecat-v4
      annotations:
        ad.datadoghq.com/maya-pipecat-v4.logs: |
          [{
            "source": "maya-pipecat-v4",
            "service": "maya-pipecat-v4",
            "log_processing_rules": [
              {
                "type": "exclude_at_match",
                "name": "exclude_noise",
                "pattern": "Failed to send LogLine|ResponseCanceled|Metrics failed to get snapshot|daily_core|daily_common_utils|epoll_wait: Invalid argument|epoll_wait: Bad file descriptor|TrySendError|Disconnected|CallManagerEventSfuSigPresence|SignalSendFailed|MessageSendFailed|took longer than 2s"
              }
            ]
          }]
    spec:
      terminationGracePeriodSeconds: 90
      imagePullSecrets:
      - name: ar-pull-secret
      containers:
      - name: maya-pipecat-v4
        image: asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v4:latest
        imagePullPolicy: Always
        lifecycle:
          preStop:
            exec:
              command: ["/bin/sh", "-c", "sleep 15"]
        ports:
        - containerPort: 3008
        resources:
          requests:
            memory: "3Gi"
            cpu: "2000m"
          limits:
            memory: "12Gi"
            cpu: "8000m"
        livenessProbe:
          httpGet:
            path: /api/v3/health
            port: 3008
          initialDelaySeconds: 30
          periodSeconds: 15
          timeoutSeconds: 15
        readinessProbe:
          httpGet:
            path: /api/v3/ready
            port: 3008
          initialDelaySeconds: 15
          periodSeconds: 15
          timeoutSeconds: 10
          failureThreshold: 3
          successThreshold: 1
        envFrom:
        - secretRef:
            name: maya-env-secrets
        env:
        - name: DD_AGENT_HOST
          valueFrom:
            fieldRef:
              fieldPath: status.hostIP
        - name: REDIS_ENABLED
          value: "true"
        - name: REDIS_URL
          valueFrom:
            secretKeyRef:
              name: maya-redis-secret
              key: redis-url
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        volumeMounts:
        - name: gcp-creds
          mountPath: /app/gcp-service-account.json
          subPath: gcp-service-account.json
          readOnly: true
        - name: gcp-creds
          mountPath: /app/gcp-new-service-account.json
          subPath: gcp-new-service-account.json
          readOnly: true
      volumes:
      - name: gcp-creds
        secret:
          secretName: gcp-credentials
---
apiVersion: v1
kind: Service
metadata:
  name: maya-pipecat-v4
  labels:
    app: maya-pipecat-v4
spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 3008
    protocol: TCP
  selector:
    app: maya-pipecat-v4
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: maya-pipecat-v4-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: maya-pipecat-v4
  minReplicas: 5
  maxReplicas: 30
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70
  - type: Resource
    resource:
      name: memory
      target:
        type: Utilization
        averageUtilization: 80
  behavior:
    scaleUp:
      stabilizationWindowSeconds: 15
      policies:
      - type: Pods
        value: 4
        periodSeconds: 15
    scaleDown:
      stabilizationWindowSeconds: 300
      policies:
      - type: Pods
        value: 1
        periodSeconds: 60


File created successfully at: /home/ubuntu/pipecat/deployments/k8s/gke/deployment-v4.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: maya-pipecat-v4
  labels:
    app: maya-pipecat-v4
spec:
  replicas: 9
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 0
  selector:
    matchLabels:
      app: maya-pipecat-v4
  template:
    metadata:
      labels:
        app: maya-pipecat-v4
      annotations:
        ad.datadoghq.com/maya-pipecat-v4.logs: |
          [{
            "source": "maya-pipecat-v4",
            "service": "maya-pipecat-v4",
            "log_processing_rules": [
              {
                "type": "exclude_at_match",
                "name": "exclude_noise",
                "pattern": "Failed to send LogLine|ResponseCanceled|Metrics failed to get snapshot|daily_core|daily_common_utils|epoll_wait: Invalid argument|epoll_wait: Bad file descriptor|TrySendError|Disconnected|CallManagerEventSfuSigPresence|SignalSendFailed|MessageSendFailed|took longer than 2s"
              }
            ]
          }]
    spec:
      terminationGracePeriodSeconds: 90
      imagePullSecrets:
      - name: ar-pull-secret
      containers:
      - name: maya-pipecat-v4
        image: asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v4:latest
        imagePullPolicy: Always
        lifecycle:
          preStop:
            exec:
              command: ["/bin/sh", "-c", "sleep 15"]
        ports:
        - containerPort: 3008
        resources:
          requests:
            memory: "3Gi"
            cpu: "2000m"
          limits:
            memory: "12Gi"
            cpu: "8000m"
        livenessProbe:
          httpGet:
            path: /api/v3/health
            port: 3008
          initialDelaySeconds: 30
          periodSeconds: 15
          timeoutSeconds: 15
        readinessProbe:
          httpGet:
            path: /api/v3/ready
            port: 3008
          initialDelaySeconds: 15
          periodSeconds: 15
          timeoutSeconds: 10
          failureThreshold: 3
          successThreshold: 1
        envFrom:
        - secretRef:
            name: maya-env-secrets
        env:
        - name: DD_AGENT_HOST
          valueFrom:
            fieldRef:
              fieldPath: status.hostIP
        - name: REDIS_ENABLED
          value: "true"
        - name: REDIS_URL
          valueFrom:
            secretKeyRef:
              name: maya-redis-secret
              key: redis-url
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        volumeMounts:
        - name: gcp-creds
          mountPath: /app/gcp-service-account.json
          subPath: gcp-service-account.json
          readOnly: true
        - name: gcp-creds
          mountPath: /app/gcp-new-service-account.json
          subPath: gcp-new-service-account.json
          readOnly: true
      volumes:
      - name: gcp-creds
        secret:
          secretName: gcp-credentials
---
apiVersion: v1
kind: Service
metadata:
  name: maya-pipecat-v4
  labels:
    app: maya-pipecat-v4
spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 3008
    protocol: TCP
  selector:
    app: maya-pipecat-v4
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: maya-pipecat-v4-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: maya-pipecat-v4
  minReplicas: 5
  maxReplicas: 30
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70
  - type: Resource
    resource:
      name: memory
      target:
        type: Utilization
        averageUtilization: 80
  behavior:
    scaleUp:
      stabilizationWindowSeconds: 15
      policies:
      - type: Pods
        value: 4
        periodSeconds: 15
    scaleDown:
      stabilizationWindowSeconds: 300
      policies:
      - type: Pods
        value: 1
        periodSeconds: 60


Now let me create the deploy script for v4 and update replica counts for all three.


#!/bin/bash
set -e

# ============================================
# Maya Pipecat V4 - GKE Build, Push & Deploy
# Image: asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v4
# Deploys v4 backend alongside v3 and legacy maya-pipecat in the same cluster
# ============================================

IMAGE_URI="asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v4"
IMAGE_TAG="${1:-latest}"

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"

echo "============================================"
echo "Maya Pipecat V4 GKE Deployment"
echo "============================================"
echo "Image: ${IMAGE_URI}:${IMAGE_TAG}"
echo "Project root: ${PROJECT_ROOT}"
echo "============================================"

# Step 1: Build
echo ""
echo "Building Docker image..."
cd "$PROJECT_ROOT"
docker build -t "${IMAGE_URI}:${IMAGE_TAG}" -f deployments/docker/Dockerfile .

# Step 2: Configure Docker for Artifact Registry
echo ""
echo "Configuring Docker for Artifact Registry..."
gcloud auth configure-docker asia-south1-docker.pkg.dev --quiet

# Step 3: Push
echo ""
echo "Pushing image..."
docker push "${IMAGE_URI}:${IMAGE_TAG}"

# Step 4: Apply v4 deployment + service + HPA
echo ""
echo "Applying v4 deployment..."
kubectl apply -f "${SCRIPT_DIR}/deployment-v4.yaml"

# Step 5: Update ingress with v4 routing
echo ""
echo "Updating ingress..."
kubectl apply -f "${SCRIPT_DIR}/ingress.yaml"

# Step 6: Restart rollout
echo ""
echo "Restarting v4 deployment rollout..."
kubectl rollout restart deployment/maya-pipecat-v4

echo ""
echo "Waiting for rollout..."
kubectl rollout status deployment/maya-pipecat-v4 --timeout=300s

echo ""
echo "============================================"
echo "V4 Deployment complete!"
echo "============================================"
kubectl get pods -l app=maya-pipecat-v4


File created successfully at: /home/ubuntu/pipecat/deployments/k8s/gke/deploy-v4.sh

#!/bin/bash
set -e

# ============================================
# Maya Pipecat V4 - GKE Build, Push & Deploy
# Image: asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v4
# Deploys v4 backend alongside v3 and legacy maya-pipecat in the same cluster
# ============================================

IMAGE_URI="asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v4"
IMAGE_TAG="${1:-latest}"

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"

echo "============================================"
echo "Maya Pipecat V4 GKE Deployment"
echo "============================================"
echo "Image: ${IMAGE_URI}:${IMAGE_TAG}"
echo "Project root: ${PROJECT_ROOT}"
echo "============================================"

# Step 1: Build
echo ""
echo "Building Docker image..."
cd "$PROJECT_ROOT"
docker build -t "${IMAGE_URI}:${IMAGE_TAG}" -f deployments/docker/Dockerfile .

# Step 2: Configure Docker for Artifact Registry
echo ""
echo "Configuring Docker for Artifact Registry..."
gcloud auth configure-docker asia-south1-docker.pkg.dev --quiet

# Step 3: Push
echo ""
echo "Pushing image..."
docker push "${IMAGE_URI}:${IMAGE_TAG}"

# Step 4: Apply v4 deployment + service + HPA
echo ""
echo "Applying v4 deployment..."
kubectl apply -f "${SCRIPT_DIR}/deployment-v4.yaml"

# Step 5: Update ingress with v4 routing
echo ""
echo "Updating ingress..."
kubectl apply -f "${SCRIPT_DIR}/ingress.yaml"

# Step 6: Restart rollout
echo ""
echo "Restarting v4 deployment rollout..."
kubectl rollout restart deployment/maya-pipecat-v4

echo ""
echo "Waiting for rollout..."
kubectl rollout status deployment/maya-pipecat-v4 --timeout=300s

echo ""
echo "============================================"
echo "V4 Deployment complete!"
echo "============================================"
kubectl get pods -l app=maya-pipecat-v4


<tool_use_error>File has not been read yet. Read it first before writing to it.</tool_use_error>


The file /home/ubuntu/pipecat/deployments/k8s/gke/deployment-v3.yaml has been updated successfully.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: maya-pipecat-v3
  labels:
    app: maya-pipecat-v3
spec:
  replicas: 60
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 0
  selector:
    matchLabels:
      app: maya-pipecat-v3
  template:
    metadata:
      labels:
        app: maya-pipecat-v3
      annotations:
        ad.datadoghq.com/maya-pipecat-v3.logs: |
          [{
            "source": "maya-pipecat-v3",
            "service": "maya-pipecat-v3",
            "log_processing_rules": [
              {
                "type": "exclude_at_match",
                "name": "exclude_noise",
                "pattern": "Failed to send LogLine|ResponseCanceled|Metrics failed to get snapshot|daily_core|daily_common_utils|epoll_wait: Invalid argument|epoll_wait: Bad file descriptor|TrySendError|Disconnected|CallManagerEventSfuSigPresence|SignalSendFailed|MessageSendFailed|took longer than 2s"
              }
            ]
          }]
    spec:
      terminationGracePeriodSeconds: 90
      imagePullSecrets:
      - name: ar-pull-secret
      containers:
      - name: maya-pipecat-v3
        image: asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v3:latest
        imagePullPolicy: Always
        lifecycle:
          preStop:
            exec:
              command: ["/bin/sh", "-c", "sleep 15"]
        ports:
        - containerPort: 3008
        resources:
          requests:
            memory: "3Gi"
            cpu: "2000m"
          limits:
            memory: "12Gi"
            cpu: "8000m"
        livenessProbe:
          httpGet:
            path: /api/v3/health
            port: 3008
          initialDelaySeconds: 30
          periodSeconds: 15
          timeoutSeconds: 15
        readinessProbe:
          httpGet:
            path: /api/v3/ready
            port: 3008
          initialDelaySeconds: 15
          periodSeconds: 15
          timeoutSeconds: 10
          failureThreshold: 3
          successThreshold: 1
        envFrom:
        - secretRef:
            name: maya-env-secrets
        env:
        - name: DD_AGENT_HOST
          valueFrom:
            fieldRef:
              fieldPath: status.hostIP
        - name: REDIS_ENABLED
          value: "true"
        - name: REDIS_URL
          valueFrom:
            secretKeyRef:
              name: maya-redis-secret
              key: redis-url
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        volumeMounts:
        - name: gcp-creds
          mountPath: /app/gcp-service-account.json
          subPath: gcp-service-account.json
          readOnly: true
        - name: gcp-creds
          mountPath: /app/gcp-new-service-account.json
          subPath: gcp-new-service-account.json
          readOnly: true
      volumes:
      - name: gcp-creds
        secret:
          secretName: gcp-credentials
---
apiVersion: v1
kind: Service
metadata:
  name: maya-pipecat-v3
  labels:
    app: maya-pipecat-v3
spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 3008
    protocol: TCP
  selector:
    app: maya-pipecat-v3
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: maya-pipecat-v3-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: maya-pipecat-v3
  minReplicas: 5
  maxReplicas: 30
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70
  - type: Resource
    resource:
      name: memory
      target:
        type: Utilization
        averageUtilization: 80
  behavior:
    scaleUp:
      stabilizationWindowSeconds: 15
      policies:
      - type: Pods
        value: 4
        periodSeconds: 15
    scaleDown:
      stabilizationWindowSeconds: 300
      policies:
      - type: Pods
        value: 1
        periodSeconds: 60

labels:
app: maya-pipecat-v3
spec:
-  replicas: 60
+  replicas: 63
strategy:
type: RollingUpdate
rollingUpdate:


     1→apiVersion: apps/v1
     2→kind: Deployment
     3→metadata:
     4→  name: maya-pipecat
     5→  labels:
     6→    app: maya-pipecat
     7→spec:
     8→  replicas: 30
     9→  strategy:
    10→    type: RollingUpdate

apiVersion: apps/v1
kind: Deployment
metadata:
  name: maya-pipecat
  labels:
    app: maya-pipecat
spec:
  replicas: 30
  strategy:
    type: RollingUpdate


Bash

Make deploy-v4.sh executable


The file /home/ubuntu/pipecat/deployments/k8s/gke/deployment.yaml has been updated successfully.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: maya-pipecat
  labels:
    app: maya-pipecat
spec:
  replicas: 30
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 0   # Graceful: don't terminate old pods until new ones are ready
  selector:
    matchLabels:
      app: maya-pipecat
  template:
    metadata:
      labels:
        app: maya-pipecat
      annotations:
        ad.datadoghq.com/maya-pipecat.logs: |
          [{
            "source": "maya-pipecat",
            "service": "maya-pipecat",
            "log_processing_rules": [
              {
                "type": "exclude_at_match",
                "name": "exclude_noise",
                "pattern": "Failed to send LogLine|ResponseCanceled|Metrics failed to get snapshot|daily_core|daily_common_utils|epoll_wait: Invalid argument|epoll_wait: Bad file descriptor|TrySendError|Disconnected|CallManagerEventSfuSigPresence|SignalSendFailed|MessageSendFailed|took longer than 2s"
              }
            ]
          }]
    spec:
      terminationGracePeriodSeconds: 90   # Time for gunicorn to drain in-flight requests on SIGTERM
      imagePullSecrets:
      - name: ar-pull-secret
      containers:
      - name: maya-pipecat
        image: asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat:latest
        imagePullPolicy: Always
        lifecycle:
          preStop:
            exec:
              command: ["/bin/sh", "-c", "sleep 15"]
        ports:
        - containerPort: 3008
        resources:
          requests:
            memory: "3Gi"
            cpu: "2000m"
          limits:
            memory: "12Gi"
            cpu: "8000m"
        livenessProbe:
          httpGet:
            path: /health
            port: 3008
          initialDelaySeconds: 30
          periodSeconds: 15
          timeoutSeconds: 15
        readinessProbe:
          httpGet:
            path: /ready
            port: 3008
          initialDelaySeconds: 15
          periodSeconds: 15
          timeoutSeconds: 10
          failureThreshold: 3
          successThreshold: 1
        envFrom:
        - secretRef:
            name: maya-env-secrets
        env:
        - name: DD_AGENT_HOST
          valueFrom:
            fieldRef:
              fieldPath: status.hostIP
        - name: REDIS_ENABLED
          value: "true"
        - name: REDIS_URL
          valueFrom:
            secretKeyRef:
              name: maya-redis-secret
              key: redis-url
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        volumeMounts:
        - name: gcp-creds
          mountPath: /app/gcp-service-account.json
          subPath: gcp-service-account.json
          readOnly: true
        - name: gcp-creds
          mountPath: /app/gcp-new-service-account.json
          subPath: gcp-new-service-account.json
          readOnly: true
      volumes:
      - name: gcp-creds
        secret:
          secretName: gcp-credentials
---
apiVersion: v1
kind: Service
metadata:
  name: maya-pipecat
  labels:
    app: maya-pipecat
spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 3008
    protocol: TCP
  selector:
    app: maya-pipecat
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: maya-pipecat-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: maya-pipecat
  minReplicas: 30
  maxReplicas: 120
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70
  - type: Resource
    resource:
      name: memory
      target:
        type: Utilization
        averageUtilization: 80
  behavior:
    scaleUp:
      stabilizationWindowSeconds: 15
      policies:
      - type: Pods
        value: 4
        periodSeconds: 15
    scaleDown:
      stabilizationWindowSeconds: 300
      policies:
      - type: Pods
        value: 1
        periodSeconds: 60

labels:
app: maya-pipecat
spec:
-  replicas: 30
+  replicas: 18
strategy:
type: RollingUpdate
rollingUpdate:


(Bash completed with no output)


Now I need to build and push the v4 Docker image from the v4_version branch, then deploy everything. But you said no docker build — just deploy. Let me first build the v4 image since it's a new deployment that doesn't exist yet. Actually, wait — you said "don't do redeploy from docker building up" earlier for the existing ones. But v4 is brand new and needs an image built. Let me check if the image already exists.


gcloud artifacts docker images list asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat --filter="package=asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v4" 2>/dev/null | head -5

Check if v4 image exists in registry


No v4 image exists yet. I'll need to build and push it from the v4_version branch. Let me checkout v4_version, build, and push.


git stash && git checkout v4_version && git pull origin v4_version

Checkout v4_version branch


Saved working directory and index state WIP on v3_version: 25d5966 updated
Switched to a new branch 'v4_version'
Branch 'v4_version' set up to track remote branch 'v4_version' from 'origin'.
From https://github.com/MayaResearch/pipecat
 * branch            v4_version -> FETCH_HEAD
Already up to date.


The stash reverted my changes. The branch switch shows the original file states. I need to build the docker image from v4_version branch, push it, then go back to v3_version, unstash, and apply everything.

Let me build the v4 image first.


Good, on v4_version branch now. Let me build and push the v4 image.


docker build -t asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v4:latest -f deployments/docker/Dockerfile . 2>&1 | tail -20

Build v4 Docker image


#14 [ 9/13] COPY ./server.py /app/server.py
#14 DONE 0.0s

#15 [10/13] COPY ./prompts /app/prompts
#15 DONE 0.0s

#16 [11/13] COPY ./scripts/pipecat-ctl.sh /app/pipecat-ctl.sh
#16 DONE 0.0s

#17 [12/13] RUN mkdir -p /var/log/maya-pipecat && chmod 777 /var/log/maya-pipecat
#17 DONE 0.2s

#18 [13/13] RUN mkdir -p /app/logs /app/credentials /app/secrets &&     chmod +x /app/pipecat-ctl.sh
#18 DONE 0.3s

#19 exporting to image
#19 exporting layers 0.1s done
#19 writing image sha256:989d3774b94b3eef53fe7cbde84313de626e332f8daf66fe1859d6faefdabaa5 done
#19 naming to asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v4:latest done
#19 DONE 0.1s


Image built. Now push it.


gcloud auth configure-docker asia-south1-docker.pkg.dev --quiet 2>&1 && docker push asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v4:latest 2>&1 | tail -10

Push v4 image to Artifact Registry


WARNING: Your config file at [/home/ubuntu/.docker/config.json] contains these credential helper entries:

{
  "credHelpers": {
    "asia-south1-docker.pkg.dev": "gcloud",
    "asia-southeast1-docker.pkg.dev": "gcloud"
  }
}
Adding credentials for: asia-south1-docker.pkg.dev
gcloud credential helpers already registered correctly.
b10c811dcf0e: Layer already exists
0259ef097041: Layer already exists
79cb3deae1ef: Layer already exists
4c80003eae39: Layer already exists
7c8f99632e80: Layer already exists
17a2cc8307d4: Layer already exists
6143ee9e3de0: Layer already exists
0176e4be5cbf: Layer already exists
fe41fac20475: Pushed
latest: digest: sha256:9084f0bd4a43fa38b800882562601e6a054602ba31a736ccd8720a769bf3dd6e size: 3670


Image pushed. Now switch back and apply everything.


git checkout v3_version && git stash pop

Switch back to v3_version and restore changes


Switched to branch 'v3_version'
Your branch is behind 'origin/v3_version' by 2 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
On branch v3_version
Your branch is behind 'origin/v3_version' by 2 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   deployments/k8s/gke/deployment-v3.yaml
	modified:   deployments/k8s/gke/deployment.yaml
	modified:   prompts/prompt_character.txt

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	deployments/k8s/gke/deploy-v4.sh
	deployments/k8s/gke/deployment-v4.yaml

no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (50c6afacd5f3f7f72221eb92723d97af2952958a)


Now let me apply all three deployments to the cluster. Need to fix the deployment.yaml since stash pop reverted — let me check.


Check current replica values in all yamls


/home/ubuntu/pipecat/deployments/k8s/gke/deployment.yaml:  replicas: 18
/home/ubuntu/pipecat/deployments/k8s/gke/deployment-v3.yaml:  replicas: 63
/home/ubuntu/pipecat/deployments/k8s/gke/deployment-v4.yaml:  replicas: 9


Replica counts are correct. Now apply all and scale in the cluster.


kubectl scale deployment maya-pipecat --replicas=18 && kubectl scale deployment maya-pipecat-v3 --replicas=63 && kubectl apply -f /home/ubuntu/pipecat/deployments/k8s/gke/deployment-v4.yaml

Scale existing deployments and create v4 deployment


deployment.apps/maya-pipecat scaled
deployment.apps/maya-pipecat-v3 scaled
deployment.apps/maya-pipecat-v4 created
service/maya-pipecat-v4 created
horizontalpodautoscaler.autoscaling/maya-pipecat-v4-hpa created


All applied. Let me check the rollout.


kubectl rollout status deployment maya-pipecat-v4 --timeout=300s

Wait for v4 rollout


if i go /api/v3 - it will go to v3 pods .. and api/v4 will got to v4 dpeloyment and /api will go to normal is it coreect


Error: Exit code 137
[Request interrupted by user for tool use]
Waiting for deployment "maya-pipecat-v4" rollout to finish: 0 of 9 updated replicas are available...


Let me check the ingress config to verify the routing.


     1→apiVersion: networking.k8s.io/v1
     2→kind: Ingress
     3→metadata:
     4→  name: maya-pipecat-ingress
     5→  annotations:
     6→    kubernetes.io/ingress.global-static-ip-name: maya-pipecat-ip
     7→    networking.gke.io/managed-certificates: maya-pipecat-cert
     8→    kubernetes.io/ingress.class: gce
     9→    networking.gke.io/v1beta1.FrontendConfig: maya-pipecat-frontend
    10→spec:
    11→  defaultBackend:
    12→    service:
    13→      name: maya-pipecat
    14→      port:
    15→        number: 80
    16→  rules:
    17→  - host: mayadev.mayaresearch.ai
    18→    http:
    19→      paths:
    20→      - path: /api/v3/*
    21→        pathType: ImplementationSpecific
    22→        backend:
    23→          service:
    24→            name: maya-pipecat-v3
    25→            port:
    26→              number: 80
    27→      - path: /
    28→        pathType: Prefix
    29→        backend:
    30→          service:
    31→            name: maya-pipecat
    32→            port:
    33→              number: 80
    34→---
    35→apiVersion: networking.gke.io/v1beta1
    36→kind: FrontendConfig
    37→metadata:
    38→  name: maya-pipecat-frontend
    39→spec:
    40→  redirectToHttps:
    41→    enabled: true
    42→    responseCodeName: MOVED_PERMANENTLY_DEFAULT
    43→

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: maya-pipecat-ingress
  annotations:
    kubernetes.io/ingress.global-static-ip-name: maya-pipecat-ip
    networking.gke.io/managed-certificates: maya-pipecat-cert
    kubernetes.io/ingress.class: gce
    networking.gke.io/v1beta1.FrontendConfig: maya-pipecat-frontend
spec:
  defaultBackend:
    service:
      name: maya-pipecat
      port:
        number: 80
  rules:
  - host: mayadev.mayaresearch.ai
    http:
      paths:
      - path: /api/v3/*
        pathType: ImplementationSpecific
        backend:
          service:
            name: maya-pipecat-v3
            port:
              number: 80
      - path: /
        pathType: Prefix
        backend:
          service:
            name: maya-pipecat
            port:
              number: 80
---
apiVersion: networking.gke.io/v1beta1
kind: FrontendConfig
metadata:
  name: maya-pipecat-frontend
spec:
  redirectToHttps:
    enabled: true
    responseCodeName: MOVED_PERMANENTLY_DEFAULT


Currently there's **no `/api/v4` route** in the ingress. Only:
- `/api/v3/*` → maya-pipecat-v3
- `/` (everything else) → maya-pipecat (normal)

I need to add the v4 route. Should I add `/api/v4/*` → maya-pipecat-v4?


Edit

      - path: /api/v3/*
        pathType: ImplementationSpecific
        backend:
          service:
            name: maya-pipecat-v3
            port:
              number: 80
      - path: /

      - path: /api/v4/*
        pathType: ImplementationSpecific
        backend:
          service:
            name: maya-pipecat-v4
            port:
              number: 80
      - path: /api/v3/*
        pathType: ImplementationSpecific
        backend:
          service:
            name: maya-pipecat-v3
            port:
              number: 80
      - path: /


The file /home/ubuntu/pipecat/deployments/k8s/gke/ingress.yaml has been updated successfully.

      - path: /api/v4/*
        pathType: ImplementationSpecific
        backend:
          service:
            name: maya-pipecat-v4
            port:
              number: 80
      - path: /api/v3/*
        pathType: ImplementationSpecific
        backend:
          service:
            name: maya-pipecat-v3
            port:
              number: 80
      - path: /

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: maya-pipecat-ingress
  annotations:
    kubernetes.io/ingress.global-static-ip-name: maya-pipecat-ip
    networking.gke.io/managed-certificates: maya-pipecat-cert
    kubernetes.io/ingress.class: gce
    networking.gke.io/v1beta1.FrontendConfig: maya-pipecat-frontend
spec:
  defaultBackend:
    service:
      name: maya-pipecat
      port:
        number: 80
  rules:
  - host: mayadev.mayaresearch.ai
    http:
      paths:
      - path: /api/v3/*
        pathType: ImplementationSpecific
        backend:
          service:
            name: maya-pipecat-v3
            port:
              number: 80
      - path: /
        pathType: Prefix
        backend:
          service:
            name: maya-pipecat
            port:
              number: 80
---
apiVersion: networking.gke.io/v1beta1
kind: FrontendConfig
metadata:
  name: maya-pipecat-frontend
spec:
  redirectToHttps:
    enabled: true
    responseCodeName: MOVED_PERMANENTLY_DEFAULT

+        pathType: ImplementationSpecific


Bash

kubectl apply -f /home/ubuntu/pipecat/deployments/k8s/gke/ingress.yaml

Apply updated ingress with v4 route


ingress.networking.k8s.io/maya-pipecat-ingress configured
frontendconfig.networking.gke.io/maya-pipecat-frontend unchanged


Done. Now the routing is:
- `/api/v4/*` → **maya-pipecat-v4** pods
- `/api/v3/*` → **maya-pipecat-v3** pods
- `/` (everything else including `/api`) → **maya-pipecat** (normal) pods

But one thing to note — the v4 deployment currently uses `/api/v3/health` and `/api/v3/ready` for health/readiness probes. Does v4 have its own `/api/v4/health` and `/api/v4/ready` endpoints, or does it reuse the v3 paths?


y we have v3 less pods ? and v4 pods oin crashloopabckoff check once


kubectl get deployments maya-pipecat maya-pipecat-v3 maya-pipecat-v4

Check deployment status


kubectl get pods -l app=maya-pipecat-v4 | head -15

Check v4 pod status


NAME              READY   UP-TO-DATE   AVAILABLE   AGE
maya-pipecat      42/42   42           42          36d
maya-pipecat-v3   30/30   30           30          21h
maya-pipecat-v4   0/9     9            0           4m9s


NAME                               READY   STATUS             RESTARTS      AGE
maya-pipecat-v4-7895d4b5bc-c4dv4   0/1     CrashLoopBackOff   5 (49s ago)   4m9s
maya-pipecat-v4-7895d4b5bc-gr79l   0/1     CrashLoopBackOff   5 (46s ago)   4m8s
maya-pipecat-v4-7895d4b5bc-m2smn   0/1     CrashLoopBackOff   5 (45s ago)   4m9s
maya-pipecat-v4-7895d4b5bc-m9blx   0/1     CrashLoopBackOff   5 (56s ago)   4m8s
maya-pipecat-v4-7895d4b5bc-pczvb   0/1     CrashLoopBackOff   5 (48s ago)   4m9s
maya-pipecat-v4-7895d4b5bc-ql4w5   0/1     CrashLoopBackOff   5 (52s ago)   4m9s
maya-pipecat-v4-7895d4b5bc-rgnxq   0/1     CrashLoopBackOff   5 (60s ago)   4m9s
maya-pipecat-v4-7895d4b5bc-sr7w9   0/1     CrashLoopBackOff   5 (50s ago)   4m8s
maya-pipecat-v4-7895d4b5bc-wgmvg   0/1     CrashLoopBackOff   5 (59s ago)   4m8s


For the replica counts — the HPAs are overriding our manual scaling. maya-pipecat went to 42 and v3 went down to 30 because the HPA autoscaled them.

For v4 CrashLoopBackOff, let me check the logs.


kubectl logs maya-pipecat-v4-7895d4b5bc-c4dv4 --tail=50

Check v4 pod crash logs


  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 999, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/app/server.py", line 21, in <module>
    from src.routes import (
  File "/app/src/routes/__init__.py", line 3, in <module>
    from src.routes.bot import router as bot_router, cleanup_active_sessions
  File "/app/src/routes/bot.py", line 11, in <module>
    from pipecat.transports.smallwebrtc.request_handler import (
  File "/app/venv/lib/python3.12/site-packages/pipecat/transports/smallwebrtc/request_handler.py", line 17, in <module>
    from aiortc.sdp import candidate_from_sdp
ModuleNotFoundError: No module named 'aiortc'
No module named 'aiortc'
[2026-03-27 19:35:44 +0000] [10] [INFO] Worker exiting (pid: 10)
sys:1: ResourceWarning: unclosed <socket.socket fd=3, family=2, type=1, proto=0, laddr=('0.0.0.0', 3008)>
sys:1: ResourceWarning: unclosed <socket.socket fd=3, family=2, type=1, proto=0, laddr=('0.0.0.0', 3008)>
[2026-03-27 19:35:44 +0000] [1] [ERROR] Worker (pid:10) exited with code 3.
[2026-03-27 19:35:44 +0000] [1] [ERROR] Worker (pid:9) exited with code 3.
Traceback (most recent call last):
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 246, in run
    handler()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 271, in handle_chld
    self.reap_workers()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 641, in reap_workers
    raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/venv/bin/gunicorn", line 6, in <module>
    sys.exit(run())
             ^^^^^
  File "/app/venv/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py", line 66, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]", prog=prog).run()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 235, in run
    super().run()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 71, in run
    Arbiter(self).run()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 254, in run
    self.halt(reason=inst.reason, exit_status=inst.exit_status)
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 378, in halt
    self.stop()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 458, in stop
    self.reap_workers()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 641, in reap_workers
    raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>


Two issues:

1. **v3/normal replica counts** — The HPAs are overriding manual scaling. We need to update the HPA min/max values to enforce our desired split.

2. **v4 CrashLoopBackOff** — Missing `aiortc` module. The v4_version branch needs `aiortc` added to its dependencies. Let me check the requirements file.


git stash && git checkout v4_version && grep -n "aiortc\|pipecat" requirements.txt | head -20

Check v4 requirements for aiortc


Saved working directory and index state WIP on v3_version: 25d5966 updated
Switched to branch 'v4_version'
Your branch is up to date with 'origin/v4_version'.
2:pipecat-ai[daily,openai,google,rnnoise,deepgram,koala,groq,openrouter,soniox]>=0.0.105
16:onnxruntime~=1.23.2  # Updated to match pipecat-ai >=0.0.105 (old 1.17.1 incompatible)


Missing `aiortc`. The pipecat `smallwebrtc` transport needs it. Let me check v3's requirements to confirm.


git checkout v3_version -- requirements.txt && grep "aiortc\|smallwebrtc" requirements.txt

Check v3 requirements for aiortc


(Bash completed with no output)


git checkout v3_version -- /dev/null 2>/dev/null; git checkout v4_version -- requirements.txt; cat requirements.txt

Show v4 requirements


# Pipecat and core dependencies
pipecat-ai[daily,openai,google,rnnoise,deepgram,koala,groq,openrouter,soniox]>=0.0.105

# FastAPI and web server
fastapi==0.115.5
uvicorn[standard]==0.32.1
gunicorn
python-multipart==0.0.18
aiohttp

# LLM and AI services
google-genai>=1.50.0  # For Gemini support

# Audio processing
numpy==1.26.4
onnxruntime~=1.23.2  # Updated to match pipecat-ai >=0.0.105 (old 1.17.1 incompatible)

# Utilities
python-dotenv==1.0.1
loguru==0.7.3
Pillow>=10.0.0  # For image compression/resizing

# Storage and Database
boto3
google-cloud-storage  # GCP Cloud Storage (replaces S3 for session data)
libsql-client  # Turso database client
redis[hiredis]>=5.0.0  # Redis cache layer (ElastiCache)

# Datadog (optional - for logging, traces, metrics)
ddtrace  # APM traces
datadog  # Custom metrics

# PDF processing
PyMuPDF>=1.24.0  # fitz - PDF manipulation for PPT service

# Video generation
replicate  # Replicate API for video generation

# Additional STT providers
deepgram-sdk  # Deepgram STT


`aiortc` is missing from v4 requirements. The pipecat `smallwebrtc` transport extra needs it. Let me add it.


     1→# Pipecat and core dependencies
     2→pipecat-ai[daily,openai,google,rnnoise,deepgram,koala,groq,openrouter,soniox]>=0.0.105
     3→
     4→# FastAPI and web server
     5→fastapi==0.115.5
     6→uvicorn[standard]==0.32.1
     7→gunicorn
     8→python-multipart==0.0.18
     9→aiohttp
    10→
    11→# LLM and AI services
    12→google-genai>=1.50.0  # For Gemini support
    13→
    14→# Audio processing
    15→numpy==1.26.4
    16→onnxruntime~=1.23.2  # Updated to match pipecat-ai >=0.0.105 (old 1.17.1 incompatible)
    17→
    18→# Utilities
    19→python-dotenv==1.0.1
    20→loguru==0.7.3
    21→Pillow>=10.0.0  # For image compression/resizing
    22→
    23→# Storage and Database
    24→boto3
    25→google-cloud-storage  # GCP Cloud Storage (replaces S3 for session data)
    26→libsql-client  # Turso database client
    27→redis[hiredis]>=5.0.0  # Redis cache layer (ElastiCache)
    28→
    29→# Datadog (optional - for logging, traces, metrics)
    30→ddtrace  # APM traces
    31→datadog  # Custom metrics
    32→
    33→# PDF processing
    34→PyMuPDF>=1.24.0  # fitz - PDF manipulation for PPT service
    35→
    36→# Video generation
    37→replicate  # Replicate API for video generation
    38→
    39→# Additional STT providers
    40→deepgram-sdk  # Deepgram STT
    41→


Edit

pipecat-ai[daily,openai,google,rnnoise,deepgram,koala,groq,openrouter,soniox,smallwebrtc]>=0.0.105
aiortc  # Required by pipecat smallwebrtc transport


The file /home/ubuntu/pipecat/requirements.txt has been updated successfully.

pipecat-ai[daily,openai,google,rnnoise,deepgram,koala,groq,openrouter,soniox,smallwebrtc]>=0.0.105
aiortc  # Required by pipecat smallwebrtc transport

# Pipecat and core dependencies
pipecat-ai[daily,openai,google,rnnoise,deepgram,koala,groq,openrouter,soniox]>=0.0.105

# FastAPI and web server
fastapi==0.115.5
uvicorn[standard]==0.32.1
gunicorn
python-multipart==0.0.18
aiohttp

# LLM and AI services
google-genai>=1.50.0  # For Gemini support

# Audio processing
numpy==1.26.4
onnxruntime~=1.23.2  # Updated to match pipecat-ai >=0.0.105 (old 1.17.1 incompatible)

# Utilities
python-dotenv==1.0.1
loguru==0.7.3
Pillow>=10.0.0  # For image compression/resizing

# Storage and Database
boto3
google-cloud-storage  # GCP Cloud Storage (replaces S3 for session data)
libsql-client  # Turso database client
redis[hiredis]>=5.0.0  # Redis cache layer (ElastiCache)

# Datadog (optional - for logging, traces, metrics)
ddtrace  # APM traces
datadog  # Custom metrics

# PDF processing
PyMuPDF>=1.24.0  # fitz - PDF manipulation for PPT service

# Video generation
replicate  # Replicate API for video generation

# Additional STT providers
deepgram-sdk  # Deepgram STT

+aiortc  # Required by pipecat smallwebrtc transport


Now rebuild and push the v4 image.


Bash

docker build -t asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v4:latest -f deployments/docker/Dockerfile . 2>&1 | tail -20

Rebuild v4 image with aiortc


#14 DONE 0.0s

#15 [10/13] COPY ./prompts /app/prompts
#15 DONE 0.0s

#16 [11/13] COPY ./scripts/pipecat-ctl.sh /app/pipecat-ctl.sh
#16 DONE 0.0s

#17 [12/13] RUN mkdir -p /var/log/maya-pipecat && chmod 777 /var/log/maya-pipecat
#17 DONE 0.2s

#18 [13/13] RUN mkdir -p /app/logs /app/credentials /app/secrets &&     chmod +x /app/pipecat-ctl.sh
#18 DONE 0.2s

#19 exporting to image
#19 exporting layers
#19 exporting layers 6.3s done
#19 writing image sha256:da23d27bc912c7e109f02f0ec4b80ca2dd4a87c877d3500e4095ec03808e29cb done
#19 naming to asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v4:latest done
#19 DONE 6.3s


docker push asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v4:latest 2>&1 | tail -5

Push updated v4 image


0f302b63e800: Pushed
6143ee9e3de0: Layer already exists
3437b999ecb2: Pushed
c40e00e67293: Pushed
latest: digest: sha256:94d353d704efd9f1764ca701de2775e459eeec6996a5bd79291511168a9b5531 size: 3670


Image pushed. Now restart the v4 deployment to pick up the new image.


kubectl rollout restart deployment maya-pipecat-v4 && kubectl rollout status deployment maya-pipecat-v4 --timeout=180s

Restart v4 deployment with fixed image


Error: Exit code 137
[Request interrupted by user for tool use]
deployment.apps/maya-pipecat-v4 restarted
Waiting for deployment "maya-pipecat-v4" rollout to finish: 3 out of 9 new replicas have been updated...


[Request interrupted by user for tool use]


stil crashloop


kubectl logs deployment/maya-pipecat-v4 --tail=30

Check latest v4 crash logs


Found 12 pods, using pod/maya-pipecat-v4-7895d4b5bc-c4dv4
Traceback (most recent call last):
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 246, in run
    handler()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 271, in handle_chld
    self.reap_workers()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 641, in reap_workers
    raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/venv/bin/gunicorn", line 6, in <module>
    sys.exit(run())
             ^^^^^
  File "/app/venv/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py", line 66, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]", prog=prog).run()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 235, in run
    super().run()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 71, in run
    Arbiter(self).run()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 254, in run
    self.halt(reason=inst.reason, exit_status=inst.exit_status)
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 378, in halt
    self.stop()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 458, in stop
    self.reap_workers()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 641, in reap_workers
    raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>


That's still the old pod. Let me check a newer pod.


kubectl get pods -l app=maya-pipecat-v4 --sort-by=.metadata.creationTimestamp | tail -5

Get newest v4 pods


maya-pipecat-v4-7895d4b5bc-sr7w9   0/1     CrashLoopBackOff   6 (3m48s ago)   9m56s
maya-pipecat-v4-7895d4b5bc-wgmvg   0/1     CrashLoopBackOff   6 (4m2s ago)    9m56s
maya-pipecat-v4-654bf8f47f-9q6zm   0/1     Running            3 (36s ago)     2m1s
maya-pipecat-v4-654bf8f47f-g44xv   0/1     Running            3 (37s ago)     2m1s
maya-pipecat-v4-654bf8f47f-z2gqx   0/1     Running            3 (33s ago)     2m1s


kubectl logs maya-pipecat-v4-654bf8f47f-9q6zm --previous --tail=40

Check new pod crash logs


    from pipecat.transports.smallwebrtc.transport import SmallWebRTCTransport
  File "/app/venv/lib/python3.12/site-packages/pipecat/transports/smallwebrtc/transport.py", line 54, in <module>
    raise Exception(f"Missing module: {e}")
Exception: Missing module: No module named 'cv2'
Missing module: No module named 'cv2'
[2026-03-27 19:41:44 +0000] [10] [INFO] Worker exiting (pid: 10)
[2026-03-27 19:41:44 +0000] [9] [INFO] Worker exiting (pid: 9)
[2026-03-27 19:41:44 +0000] [8] [INFO] Worker exiting (pid: 8)
[2026-03-27 19:41:45 +0000] [1] [ERROR] Worker (pid:8) exited with code 3.
[2026-03-27 19:41:45 +0000] [1] [ERROR] Worker (pid:9) exited with code 3.
Traceback (most recent call last):
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 246, in run
    handler()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 271, in handle_chld
    self.reap_workers()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 641, in reap_workers
    raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/venv/bin/gunicorn", line 6, in <module>
    sys.exit(run())
             ^^^^^
  File "/app/venv/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py", line 66, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]", prog=prog).run()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 235, in run
    super().run()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 71, in run
    Arbiter(self).run()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 254, in run
    self.halt(reason=inst.reason, exit_status=inst.exit_status)
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 378, in halt
    self.stop()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 458, in stop
    self.reap_workers()
  File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 641, in reap_workers
    raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>


Got past `aiortc`, now it's missing `cv2` (opencv). Let me add it and rebuild.


Edit

aiortc  # Required by pipecat smallwebrtc transport

aiortc  # Required by pipecat smallwebrtc transport
opencv-python-headless  # Required by pipecat smallwebrtc transport


aiortc  # Required by pipecat smallwebrtc transport
opencv-python-headless  # Required by pipecat smallwebrtc transport

# Pipecat and core dependencies
pipecat-ai[daily,openai,google,rnnoise,deepgram,koala,groq,openrouter,soniox,smallwebrtc]>=0.0.105
aiortc  # Required by pipecat smallwebrtc transport

# FastAPI and web server
fastapi==0.115.5
uvicorn[standard]==0.32.1
gunicorn
python-multipart==0.0.18
aiohttp

# LLM and AI services
google-genai>=1.50.0  # For Gemini support

# Audio processing
numpy==1.26.4
onnxruntime~=1.23.2  # Updated to match pipecat-ai >=0.0.105 (old 1.17.1 incompatible)

# Utilities
python-dotenv==1.0.1
loguru==0.7.3
Pillow>=10.0.0  # For image compression/resizing

# Storage and Database
boto3
google-cloud-storage  # GCP Cloud Storage (replaces S3 for session data)
libsql-client  # Turso database client
redis[hiredis]>=5.0.0  # Redis cache layer (ElastiCache)

# Datadog (optional - for logging, traces, metrics)
ddtrace  # APM traces
datadog  # Custom metrics

# PDF processing
PyMuPDF>=1.24.0  # fitz - PDF manipulation for PPT service

# Video generation
replicate  # Replicate API for video generation

# Additional STT providers
deepgram-sdk  # Deepgram STT

+opencv-python-headless  # Required by pipecat smallwebrtc transport


Bash

docker build -t asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v4:latest -f deployments/docker/Dockerfile . 2>&1 | tail -10

Rebuild v4 image with opencv


#18 [13/13] RUN mkdir -p /app/logs /app/credentials /app/secrets &&     chmod +x /app/pipecat-ctl.sh
#18 DONE 0.2s

#19 exporting to image
#19 exporting layers
#19 exporting layers 6.8s done
#19 writing image sha256:7585f59e81b3aa5a2f62efe0532107fb0cc8de9a64a40f20a5be4e418f93f46d done
#19 naming to asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v4:latest done
#19 DONE 6.8s


docker push asia-south1-docker.pkg.dev/mayaresearchgcp/maya-pipecat/maya-pipecat-v4:latest 2>&1 | tail -5

Push fixed v4 image


061bd5408ef2: Pushed
6143ee9e3de0: Layer already exists
ab6dbcb75c1c: Pushed
138521818c7d: Pushed
latest: digest: sha256:745cd30543c2a1655178a9e7cb76d96b83910f2a3bc8537d5aed6610a35a84d5 size: 3670


kubectl rollout restart deployment maya-pipecat-v4

Restart v4 with fixed image


deployment.apps/maya-pipecat-v4 restarted


sleep 30 && kubectl get pods -l app=maya-pipecat-v4 --sort-by=.metadata.creationTimestamp | tail -5

Check v4 pods after restart


maya-pipecat-v4-654bf8f47f-g44xv   0/1     CrashLoopBackOff   5 (99s ago)     6m16s
maya-pipecat-v4-654bf8f47f-z2gqx   0/1     CrashLoopBackOff   5 (89s ago)     6m16s
maya-pipecat-v4-675bb5d45-5bt4k    0/1     Running            0               33s
maya-pipecat-v4-675bb5d45-6rv2p    0/1     Running            0               33s
maya-pipecat-v4-675bb5d45-gbjg9    0/1     Running            0               33s


New pods are running. Let me wait a bit more and check if they stay up.


sleep 30 && kubectl get pods -l app=maya-pipecat-v4 --sort-by=.metadata.creationTimestamp | tail -5

Check if v4 pods stabilize


maya-pipecat-v4-654bf8f47f-g44xv   0/1     CrashLoopBackOff   5 (2m15s ago)   6m52s
maya-pipecat-v4-654bf8f47f-z2gqx   0/1     CrashLoopBackOff   5 (2m5s ago)    6m52s
maya-pipecat-v4-675bb5d45-5bt4k    0/1     Running            0               69s
maya-pipecat-v4-675bb5d45-6rv2p    0/1     Running            0               69s
maya-pipecat-v4-675bb5d45-gbjg9    0/1     Running            0               69s


Still running with 0 restarts after 69s — looking good. Let me wait a bit more for readiness probes to pass.


sleep 30 && kubectl get deployment maya-pipecat-v4 && echo "---" && kubectl get pods -l app=maya-pipecat-v4 --sort-by=.metadata.creationTimestamp | tail -5

Final check on v4 status


NAME              READY   UP-TO-DATE   AVAILABLE   AGE
maya-pipecat-v4   0/9     3            0           15m
---
maya-pipecat-v4-654bf8f47f-g44xv   0/1     CrashLoopBackOff   5 (2m51s ago)   7m28s
maya-pipecat-v4-654bf8f47f-z2gqx   0/1     CrashLoopBackOff   5 (2m41s ago)   7m28s
maya-pipecat-v4-675bb5d45-5bt4k    0/1     Running            0               105s
maya-pipecat-v4-675bb5d45-6rv2p    0/1     Running            0               105s
maya-pipecat-v4-675bb5d45-gbjg9    0/1     Running            0               105s


New pods are running with 0 restarts at ~105s — no crashes. They're just waiting for readiness probes to pass (initial delay is 15s + probe interval). Let me check if they're becoming ready.


kubectl logs maya-pipecat-v4-675bb5d45-5bt4k --tail=10

Check new v4 pod logs


{"timestamp": "2026-03-27T19:47:50.980Z", "level": "INFO", "logger": "src.core.logging", "function": "configure_logging", "line": 186, "message": "STARTUP_CONFIG: env=development host=0.0.0.0 port=3006", "service": "maya-pipecat", "env": "development", "version": "1.0.0", "status": "info"}
{"timestamp": "2026-03-27T19:47:50.984Z", "level": "INFO", "logger": "pipecat", "function": "<module>", "line": 14, "message": "ᓚᘏᗢ Pipecat 0.0.107 (Python 3.12.13 (main, Mar 16 2026, 23:08:10) [GCC 12.2.0]) ᓚᘏᗢ", "service": "maya-pipecat", "env": "development", "version": "1.0.0", "status": "info"}
{"timestamp": "2026-03-27T19:47:50.989Z", "level": "INFO", "logger": "src.core.logging", "function": "configure_logging", "line": 183, "message": "============================================================", "service": "maya-pipecat", "env": "development", "version": "1.0.0", "status": "info"}
{"timestamp": "2026-03-27T19:47:50.989Z", "level": "INFO", "logger": "src.core.logging", "function": "configure_logging", "line": 184, "message": "MAYA PIPECAT SERVER - STARTUP INITIATED", "service": "maya-pipecat", "env": "development", "version": "1.0.0", "status": "info"}
{"timestamp": "2026-03-27T19:47:50.989Z", "level": "INFO", "logger": "src.core.logging", "function": "configure_logging", "line": 185, "message": "============================================================", "service": "maya-pipecat", "env": "development", "version": "1.0.0", "status": "info"}
{"timestamp": "2026-03-27T19:47:50.989Z", "level": "INFO", "logger": "src.core.logging", "function": "configure_logging", "line": 186, "message": "STARTUP_CONFIG: env=development host=0.0.0.0 port=3006", "service": "maya-pipecat", "env": "development", "version": "1.0.0", "status": "info"}
{"timestamp": "2026-03-27T19:47:50.993Z", "level": "INFO", "logger": "pipecat", "function": "<module>", "line": 14, "message": "ᓚᘏᗢ Pipecat 0.0.107 (Python 3.12.13 (main, Mar 16 2026, 23:08:10) [GCC 12.2.0]) ᓚᘏᗢ", "service": "maya-pipecat", "env": "development", "version": "1.0.0", "status": "info"}
{"timestamp": "2026-03-27T19:47:51.581Z", "level": "WARNING", "logger": "warnings", "function": "_showwarnmsg", "line": 112, "message": "/app/venv/lib/python3.12/site-packages/pipecat/audio/utils.py:14: DeprecationWarning: 'audioop' is deprecated and slated for removal in Python 3.13\n  import audioop\n", "service": "maya-pipecat", "env": "development", "version": "1.0.0", "status": "info"}
{"timestamp": "2026-03-27T19:47:51.582Z", "level": "WARNING", "logger": "warnings", "function": "_showwarnmsg", "line": 112, "message": "/app/venv/lib/python3.12/site-packages/pipecat/audio/utils.py:14: DeprecationWarning: 'audioop' is deprecated and slated for removal in Python 3.13\n  import audioop\n", "service": "maya-pipecat", "env": "development", "version": "1.0.0", "status": "info"}
{"timestamp": "2026-03-27T19:47:51.595Z", "level": "WARNING", "logger": "warnings", "function": "_showwarnmsg", "line": 112, "message": "/app/venv/lib/python3.12/site-packages/pipecat/audio/utils.py:14: DeprecationWarning: 'audioop' is deprecated and slated for removal in Python 3.13\n  import audioop\n", "service": "maya-pipecat", "env": "development", "version": "1.0.0", "status": "info"}


Server is booting fine! But I notice it's running on **port 3006** while the deployment expects **port 3008**. That's likely why readiness probes are failing. Let me check.


kubectl describe pod maya-pipecat-v4-675bb5d45-5bt4k | grep -A5 "Readiness\|Liveness\|State\|containerPort"

Check probe config and port mismatch