Workload Troubleshooting

Systematic troubleshooting for applications on the ayedo SDP: ImagePullBackOff, CrashLoopBackOff, Pending Pods, PVCs, Ingress, Envoy HTTPRoute, and DNS.

Workload Troubleshooting

This page helps application developers and team leads systematically diagnose common issues in their Kubernetes namespaces on the ayedo Software Delivery Platform (SDP).

Systematic Approach in Your Namespace

Start every investigation with a quick overview of the state of your namespace:

# Identify non-running pods
kubectl get pods -n acme-production

# Display recent events sorted chronologically
kubectl get events -n acme-production --sort-by='.lastTimestamp'

# Check status of Deployments, Services, Ingresses, and HTTPRoutes
kubectl get deploy,svc,ingress,httproute,pvc -n acme-production

For historical logs and metrics, use Grafana in parallel (VictoriaLogs and VictoriaMetrics data sources — see Access & Observability).

Common Failure Patterns and Solutions

1. ImagePullBackOff / ErrImagePull

Symptom: A pod stays in ImagePullBackOff or ErrImagePull status.

Typical causes: - Image name or tag does not exist in the registry (typo or failed pipeline push) - imagePullSecret is missing in the namespace, expired, or not referenced in the Deployment or ServiceAccount - Registry is not permitted by a policy or NetworkPolicy

Diagnosis:

# Show the specific kubelet error message
kubectl describe pod <pod-name> -n acme-production | grep -A 8 -E "Failed|Events"

# Check existing pull secrets in the namespace
kubectl get secrets -n acme-production --field-selector type=kubernetes.io/dockerconfigjson

# Test pulling the image locally against the registry
docker pull registry.acme.corp/acme/my-app:1.0.0

Resolution: Correct the image path and tag, provide a valid registry secret (e.g., via OpenBao/External Secrets or a robot account in Harbor), and review the Guardrails.

2. CrashLoopBackOff and OOMKilled

Symptom: A container restarts repeatedly (CrashLoopBackOff) or terminates with exit code 137 (OOMKilled).

Typical causes: - Application startup error (e.g., missing environment variable, invalid configuration, unreachable database) - Liveness or startup probe fails too early - Memory limit is sized too low (OOMKilled) - Non-root filesystem permissions do not match readOnlyRootFilesystem or runAsUser

Diagnosis:

# Retrieve logs from the previous crashed container
kubectl logs <pod-name> -n acme-production --previous

# Check exit code and termination reason (e.g., OOMKilled)
kubectl describe pod <pod-name> -n acme-production

# Check current ConfigMaps, Secrets, and ExternalSecrets in the namespace
kubectl get configmap,secret,externalsecret -n acme-production

Resolution: Analyze the --previous logs, check your probes (initialDelaySeconds / startupProbe), increase the memory limit for OOMKilled events, and verify the sync status of your ExternalSecret resources.

3. Pending Pods

Symptom: A pod remains permanently in Pending status and is not scheduled onto any node.

Typical causes: - Requested resources.requests exceed available worker node capacity or the namespace ResourceQuota - A referenced PersistentVolumeClaim is still Pending - nodeSelector, affinity, or topologySpreadConstraints cannot be satisfied

Diagnosis:

# Read scheduler message in pod events
kubectl describe pod <pod-name> -n acme-production

# Check namespace quotas and LimitRanges
kubectl describe resourcequota,limitrange -n acme-production

# Check PVC status
kubectl get pvc -n acme-production

Resolution: Check whether your requests are realistically sized (see Capacity Management) or whether a quota/capacity expansion is required.

4. PVC Remains in Pending Status

Symptom: A PersistentVolumeClaim does not transition to Bound status.

Typical causes: - Specified storageClassName does not exist in the cluster - The StorageClass uses WaitForFirstConsumer (the volume is only bound once a pod actually mounts the PVC) - Storage quota in the namespace or capacity in the storage backend is exhausted - ReadWriteMany (RWX) requested on a block-only StorageClass (RWO)

Diagnosis:

kubectl describe pvc <pvc-name> -n acme-production
kubectl get storageclass

For details on available StorageClasses and access modes, see Platform Storage.

5. Service, Ingress, or Envoy HTTPRoute Unreachable

Symptom: An application returns 404, 502/503, 504, or a connection timeout.

Typical causes: - The Kubernetes Service has no active endpoints (label selector does not match pod labels, or readiness probe is failing) - Port configuration between Service (port/targetPort) and container does not match - For NGINX Ingress: wrong ingressClassName, missing TLS secret, or incorrect path - For Envoy Gateway (HTTPRoute): parentRefs (name, namespace, sectionName) or hostnames do not match the Gateway, or the route is not Accepted - A NetworkPolicy blocks traffic from the ingress/gateway namespace or to the backend

Diagnosis:

# 1. Check Service endpoints (must contain pod IPs)
kubectl get endpoints <service-name> -n acme-production
kubectl get endpointslice -l kubernetes.io/service-name=<service-name> -n acme-production

# 2. Test pod locally via port-forward (bypasses Ingress/Gateway)
kubectl port-forward svc/<service-name> 8080:80 -n acme-production

# 3. Inspect Ingress (NGINX)
kubectl describe ingress <ingress-name> -n acme-production

# 4. Inspect HTTPRoute status and conditions (Envoy Gateway)
kubectl describe httproute <route-name> -n acme-production

# 5. Check TLS certificates in the namespace
kubectl get certificate,certificaterequest -n acme-production

# 6. List NetworkPolicies in the namespace
kubectl get networkpolicies -n acme-production

For further details on routing and TLS configuration, see Ingress & Edge and Cluster Integrations.

Interactive Debugging and DNS Checks

Ephemeral Debug Containers with kubectl debug

If a container image is intentionally minimal (e.g., distroless without a shell), temporarily attach a debug container to a running pod:

kubectl debug -it <pod-name> -n acme-production \
  --image=busybox:1.36 \
  --target=<container-name> -- sh

Network and DNS Debugging with netshoot

For deeper network, HTTP, TLS, and DNS tests directly from your namespace, start a temporary netshoot pod (provided your registry policies permit the image or it is mirrored in your Harbor registry):

kubectl run debug-net -n acme-production \
  --image=nicolaka/netshoot:v0.13 \
  --rm -it --restart=Never -- bash

Inside the debug pod, you can run targeted tests:

# Verify internal DNS resolution
dig +short <service-name>.acme-production.svc.cluster.local

# Test HTTP reachability and response headers
curl -v http://<service-name>.acme-production.svc.cluster.local:80/health

# Check TCP port and TLS handshake
nc -zv <db-service>.acme-production.svc.cluster.local 5432
openssl s_client -connect app.example.com:443 -servername app.example.com

Creating a Diagnostic Bundle for Support

When escalating an issue to support or your platform administration team, assemble a focused diagnostic bundle from the affected namespace:

NAMESPACE="acme-production"
OUT_DIR="debug-${NAMESPACE}-$(date +%Y%m%d-%H%M%S)"
mkdir -p "${OUT_DIR}"

# Overview of resources in the namespace
kubectl get pods,deploy,sts,svc,endpoints,ingress,httproute,pvc,certificate -n "${NAMESPACE}" -o wide > "${OUT_DIR}/resources.txt"

# Recent events
kubectl get events -n "${NAMESPACE}" --sort-by='.lastTimestamp' > "${OUT_DIR}/events.txt"

# Details and logs of a specific failing pod (adjust name)
POD="<pod-name>"
kubectl describe pod "${POD}" -n "${NAMESPACE}" > "${OUT_DIR}/pod-describe.txt"
kubectl logs "${POD}" -n "${NAMESPACE}" --tail=200 > "${OUT_DIR}/pod-logs.txt" 2>&1 || true
kubectl logs "${POD}" -n "${NAMESPACE}" --previous --tail=200 > "${OUT_DIR}/pod-logs-previous.txt" 2>&1 || true

# Package as archive
tar czf "${OUT_DIR}.tar.gz" "${OUT_DIR}"

In the support ticket, also include: cluster name, namespace, time of occurrence, recent changes (e.g., a new release), and observed error messages.

Further Reading