# Debugging

## Pod Monitoring and Logging

Describe deployments or pods for obtaining the subsequent events.

```
$ kubectl describe po/<pod-name>
```

{% hint style="warning" %}
Replace \<pod-name> with the name of your pod.
{% endhint %}

Get the pod logs using the below command.

```
$ kubectl logs <pod-name>
```

## Exec into the pod

```
$ kubectl exec -it <pod-name> /bin/bash
```

```
$ ps -ef
```

{% hint style="info" %}
See all processes inside the pod using this command.
{% endhint %}

```
$ exit
```

{% hint style="info" %}
Type exit command to come out of the pod.
{% endhint %}

## Thanks for reading. Hope you're having a good day!&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://amdocs-1.gitbook.io/kubernetes-handbook/dashboard-and-debugging/debugging.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
