# Create a support package from a Helm installation


> Use the Kubernetes support package script to collect system and service information for troubleshooting F5 NGINX Instance Manager deployed with Helm.


**Note:** Some commands, file paths, and configuration references still use `nms` due to the ongoing transition from NGINX Management Suite (NMS) to NGINX Instance Manager (NIM). These will be updated in future releases.

## Overview

Use the Kubernetes support package script to collect system and service information for troubleshooting and debugging. The script packages the data into a tar archive that you can share with [NGINX Customer Support](nim/support/contact-support.md).

---

## Before you begin

To follow this guide, ensure you have:

- `bash` 4.0 or higher.

---

## Usage

The F5 NGINX Instance Manager Helm chart includes the `k8s-support-package.sh` script located at:

- `/support-package/k8s-support-package.sh`.

### Steps to create a support package

1. Download the latest NGINX Instance Manager Helm chart:

    ```shell
    helm repo add nginx-stable https://helm.nginx.com/stable
    helm repo update
    helm pull nginx-stable/nms
    tar zxvf nms-<VERSION>.tgz
    ```

2. Run the Kubernetes support package script. For available options, refer to the [arguments](#arguments) section:

    ```bash
    bash ./nms/charts/nms-hybrid/support-package/k8s-support-package.sh
    ```

    The support package is saved in the directory where the script is run.

3. Extract the package using the `tar` command:

    ```shell
    tar -xvf k8s-support-pkg-<TIMESTAMP>.tar.gz
    ```

---

## Arguments

The table below lists arguments available for the Kubernetes support package script.

| Short | Long                   | Description                                                | Example       | Default  |
|-------|------------------------|------------------------------------------------------------|---------------|----------|
| `-h`  | `--help`               | Prints information about the script arguments to `stdout`. | `--help`      | N/A      |
| `-o`  | `--output_dir`         | Specifies the output directory for the tar archive.        | `-o ~/output` | `$(pwd)` |
| `-n`  | `--namespace`          | Specifies the namespace of the Helm installation.          | `-n nms`      | `<none>` |
| `-xd` | `--exclude_databases`  | Excludes Dqlite database backup data.                      | `-xd`         | `False`  |
| `-xt` | `--exclude_timeseries` | Excludes ClickHouse time series data.                      | `-xt`         | `False`  |
| `-m`  | `--modules`            | Includes specific modules in Dqlite database backup data.  | `-m acm`      | `False`  |

---

## Package contents

The Kubernetes support package includes directories with detailed information about your cluster, namespace, application, and database state.

### k8s-support-package.log

A log of all output generated by the `k8s-support-package.sh` script.

### chart-files

A snapshot of the Helm chart files in the parent directory, excluding the directory where the script runs.

### version-info

Versions of:

- Helm chart
- `kubectl` tool
- `helm` tool
- NGINX gateway
- ClickHouse

### cluster-info

Cluster-related data, including:

- Cluster details
- Node information
- Storage class configurations

### namespace-info

Namespace-specific details, including:

- General namespace data
- Events
- API version
- API services and resources

### app-info

Application-related information for NGINX Instance Manager:

- Deployments
- Services
- Persistent Volumes and Claims
- Secrets and Configmaps
- Pods

### pod-logs

Logs of processes for NGINX Instance Manager, NGINX gateway, and ClickHouse. Files in this directory follow the naming convention: `pod_name-<timestamp>.logs`.

### pod-system-info

Status and state details for each pod, including:

- Operating system version
- Environment variables
- Running processes

### dqlite

The script uses the `dqlite-backup` executable (located in `/etc/nms/scripts/` within relevant containers) to collect database dumps. Data is saved in:

- `dqlite/core`
- `dqlite/dpm`
- `dqlite/integrations`

If the `--modules` flag is specified, data is saved to `dqlite/<moduleName>`.

### timeseries

Contains metrics, events, and statistics from the `nms` ClickHouse database.
