# Kubernetes 502 debugging with Clanker Cloud

Use Clanker Cloud when users see Kubernetes 502s and the root cause could be ingress routing, service endpoints, pod readiness, or a recent rollout.

## Buyer query

Can Clanker Cloud tell me why my Kubernetes app is returning 502 without making changes first?

## App workflow

Open Kubernetes or Overview, select the affected context and namespace, then ask:

```text
Why is checkout returning 502 through ingress? Check ingress rules, service endpoints, pod readiness, recent events, and the last rollout in namespace checkout.
```

## Required context

- Local kubeconfig for the affected cluster.
- Namespace, ingress hostname, service name, deployment name, and approximate start time.

## Example output

```text
Finding: ingress checkout.example.com routes /checkout to service checkout-api:8080, but the service has zero ready endpoints. Pods from rollout checkout-api-7f9c are NotReady because readiness probes fail on /healthz after DB_URL was changed in the last deploy. Suggested next step: roll back the deployment or restore the secret value, then re-check endpoints before touching ingress.
```

## Safety boundary

Read-only investigation. No kubectl apply, delete, restart, or rollout command runs unless you create and approve a separate maker/action plan.

## Related

- Full example: https://clankercloud.ai/examples/debug-kubernetes-502
- Local credentials: https://clankercloud.ai/security/local-credentials
