Issue while deploying container in GKE

I am getting this error while deploying in GKE :

Error from server: Get "https://10.x.x.x:10200/containerLogs/server-center/server-center-dev-86f67jkilo-rwrnm/server-center-dev": No agent available

Workload shows pod status as :

Doesn't have minimum availability 

Please help, as i am a beginner in GCP.

Simple and Straightforward Answer:

The error:

Error from server: Get "...containerLogs...": No agent available

and

Doesn't have minimum availability

means:

  1. Your pod failed to start properly, so it’s not available.
  2. The GKE logging/monitoring agent can’t connect because the pod never became healthy.

How to Fix It:

  1. Check pod status and logs:
    Run:
kubectl get pods
kubectl describe pod <pod-name>
kubectl logs <pod-name>

This will show what’s failing (e.g., crash, image pull, readiness probe, etc.).
2. Common causes to check:

  • :cross_mark: Wrong container image or tag
  • :cross_mark: Missing environment variables
  • :cross_mark: App crashing on startup
  • :cross_mark: Health checks (liveness/readiness) are failing
  1. Check deployment YAML:
    Ensure:
  • The image is correct and exists
  • All required env vars are set
  • Resource limits are not too low
  • Probes are not too aggressive (e.g., increase initial delay)

Example to fix readiness probe (common cause):

If you see this in your deployment:

readinessProbe:
  httpGet:
    path: /health
    port: 8080
  initialDelaySeconds: 5
  periodSeconds: 10

Try increasing initialDelaySeconds to give your app more time to start:

initialDelaySeconds: 30