Start by gathering evidence from the pod's logs, events, and configuration to identify the root cause, then systematically rule out common JDBC failure modes like connectivity, credentials, and driver issues. Finally, propose a fix and a preventive measure to avoid recurrence.
Pro tip: Always check the pod's restart count and last termination reason first—it often points directly to the root cause and shows you know how to prioritize signals over noise.
Run kubectl describe pod and kubectl logs --previous to see the crash reason, exit code, and any error messages. Check events for OOMKilled, liveness probe failures, or image pull issues.
Review the pod's environment variables, secrets, and config maps for database URL, credentials, and connection pool settings. Verify the JDBC driver version and compatibility with the database.
From within the cluster, try to connect to the database using the same credentials and network path (e.g., via a debug pod). Check for DNS resolution, firewall rules, or TLS certificate issues.
Look for stack traces indicating connection timeouts, authentication failures, or driver errors. Check if the database is reachable and if connection pool limits are exceeded.
Based on findings, correct the configuration, update secrets, adjust resource limits, or fix network policies. Add liveness/readiness probes and monitoring to catch issues early.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.