Systematic Troubleshooting and Debugging Questions
Covers structured methods for diagnosing and resolving software defects and technical problems at the code and system level. Candidates should demonstrate methodical debugging practices such as reading and reasoning about code, tracing execution paths, reproducing issues, collecting and interpreting logs metrics and error messages, forming and testing hypotheses, and iterating toward root cause. Topic includes use of diagnostic tools and commands, isolation strategies, instrumentation and logging best practices, regression testing and validation, trade offs between quick fixes and long term robust solutions, rollback and safe testing approaches, and clear documentation of investigative steps and outcomes.
Sample Answer
Sample Answer
Sample Answer
kubectl get pods -o wide --namespace myns
kubectl describe pod my-pod-<id> --namespace myns
kubectl get events --namespace myns --sort-by=.lastTimestampkubectl logs my-pod-<id> -c my-container --namespace myns
kubectl logs my-pod-<id> -c my-container --previous --namespace mynskubectl get pod my-pod-<id> -o yaml --namespace myns
kubectl describe pod my-pod-<id> | grep -A5 "Containers:"
kubectl rollout history deploy/my-deployment --namespace mynskubectl patch deploy my-deployment -p '{"spec":{"template":{"spec":{"containers":[{"name":"my-container","livenessProbe":null,"readinessProbe":null}]}}}}' --namespace mynskubectl top pod my-pod-<id> --namespace myns
kubectl top node <node-name>
kubectl describe node <node-name> | grep -A5 "Allocatable\|Non-terminated"
kubectl get pod my-pod-<id> -o jsonpath='{.status.containerStatuses[0].lastState}'kubectl debug -it my-pod-<id> --image=busybox --target=my-container --namespace myns
kubectl alpha debug node/<node-name> -it --image=busyboxkubectl logs deploy/my-deployment --namespace myns --since=1h
kubectl get events --all-namespaces --sort-by=.lastTimestamp > /tmp/events.log
kubectl get pods -o yaml --namespace myns > /tmp/pods.yamldocker run --rm -e VAR=val --name local-test my-registry/my-image:tagkubectl apply -f pod-debug.yaml --namespace debugSample Answer
Sample Answer
histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job="api", handler="/v1/foo"}[5m])) by (le))histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job="api", handler="/v1/foo"}[5m])) by (le))
or on() vector(0) # plot trendhistogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job="api", handler="/v1/foo"}[5m])) by (le, instance))sum(rate(http_requests_total{job="api", handler="/v1/foo"}[1m])) by (instance)sum(rate(http_requests_total{job="api", handler="/v1/foo"}[1m])) by (instance)
sum(rate(http_responses_total{job="api", code=~"5..", handler="/v1/foo"}[1m])) by (instance)sum(rate(process_cpu_seconds_total{job="api"}[1m])) by (instance)sum(rate(span_duration_seconds_sum{service="api", span="db_query"}[5m])) by (instance)node_load1, node_cpu_seconds_total, process_resident_memory_bytes, jvm_gc_pause_seconds_count (or equivalent)node_disk_io_time_seconds_total, node_network_receive_bytes_totalUnlock Full Question Bank
Get access to hundreds of Systematic Troubleshooting and Debugging interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.