Skip to content

Commit

Permalink
add(commands): add better text
Browse files Browse the repository at this point in the history
  • Loading branch information
ybelMekk committed Nov 8, 2024
1 parent 0f513b4 commit bc5e0bb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/operate/cli/reference/debug.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# debug command

The kubectl debug command allows you to troubleshoot workloads running on the NAIS platform. This command creates a
The debug command allows you to troubleshoot workloads running on the NAIS platform.This command creates a
debug pod within the same namespace as the target workload and connects it to the same network. There are two options
for debugging a workload: you can either create a container within the same pod as the workload or create a separate pod
in the same namespace as the workload, with the latter option providing
Expand All @@ -11,6 +11,16 @@ a [shared namespace](https://kubernetes.io/docs/tasks/configure-pod-container/sh
Creates a debug pod in the same namespace as the target workload. This command will create a debug pod in the same
namespace as the target workload and connect it to the same network.

`nais debug app` creates a debug container in the "live" pod, meaning it’s not a copy of the original pod. If you exit
this command with `exit`, you cannot reconnect or attach again, because the debug container is terminated. To
reconnect, simply run `nais debug app` again, this will create a new debug container in the same pod. See
`naist debug tidy` to clean up the pod you just debugged.

`nais debug app --copy app` creates a copy of the original pod in the same namespace. This is useful if you want to
debug the pod without affecting the live pod, useful for debugging production workloads.
If you exit this command with `exit`, you can reconnect or attach again by
running `nais debug app --copy app` again. See `nais debug tidy` to clean up the pod you just debugged.

```bash
nais debug app
```
Expand Down

0 comments on commit bc5e0bb

Please sign in to comment.