> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kubox.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> General troubleshooting guide and overview for some issues we’ve seen.

Kubox is complex, but we strive to make it as simple as possible. However, this complexity means there are several things that can potentially go wrong. Below is a list of common issues our customers have encountered:

<Accordion title="Control Logging Verbosity">
  The default logging level is set to `info`. To control the logging level in
  Kubox, set the `LOG_LEVEL` environment variable in the **.env file** located in
  the working directory. For example:

  ```text theme={null}
    LOG_LEVEL="debug" 
  ```

  The available logging levels, in increasing order of verbosity, are: `panic`, `fatal`, `error`, `warn`, `info`, `debug`, and `trace`.
</Accordion>

<Accordion title="Verifying GPU Nodes">
  ```bash theme={null}
  kubectl run \
    nvidia-test \
    --restart=Never \
    -ti --rm \
    --image nvcr.io/nvidia/cuda:12.5.0-base-ubuntu22.04 \
    --overrides '{"spec": {"runtimeClassName": "nvidia"}}' \
    nvidia-smi
  ```

  ```yaml theme={null}
  apiVersion: v1
  kind: Pod
  metadata:
    name: ray-tty
    labels:
      app: ray
  spec:
    runtimeClassName: nvidia
    nodeSelector:
      nodetype: "gpu"
    tolerations:
      - key: "gpunode"
        operator: "Equal"
        value: "true"
        effect: "NoExecute"
    containers:
      - name: ray-container
        image: rayproject/ray:latest-py311-cu123
        command: ["/bin/sh"]
        args: ["-c", "while true; do sleep 30; done"]
        tty: true
        stdin: true
    restartPolicy: Never
  ```
</Accordion>

## Failed Delete

<Accordion title="Deleting AWS resource manually.">
  If you encounter errors while creating or deleting Kubox clusters, you may need to manually clean up AWS resources. Follow these steps to remove the resources associated with your Kubox cluster:

  1. Delete EC2 **Target Groups**: Navigate to the EC2 Console > Target Groups (left sidebar) and delete the relevant target groups.
  2. Delete EC2 **Load Balancers**: Go to the EC2 Console > Load Balancers and remove the associated load balancers.
  3. Terminate **EC2 Instances**: Delete the EC2 instances linked to the Kubox cluster.
  4. Delete the **VPC**: Deleting the VPC will clean up remaining resources.

  After removing Target Groups and Load Balancers, proceed with deleting the VPC to finalise the cleanup.
</Accordion>
