# kubectl kedify plugin

The kubectl-kedify plugin provides a simple TUI-based interface for managing and troubleshooting Kedify installations.

## Installation

### Prerequisites

The plugin requires several dependencies to function properly:

**macOS (Homebrew):**

```bash
brew install bat curl figlet fzf kubecolor yq jq
```

**Linux (apt):**

```bash
apt-get install bat curl figlet fzf jq
```

**Linux (yum):**

```bash
yum install bat curl figlet fzf jq
```

For `yq`, consult the [official installation guide](https://github.com/mikefarah/yq#install).

**Note:** `kubecolor` is optional but recommended for enhanced output formatting.

### Using Krew (Recommended)

If you don’t have krew installed, first install it by following the [krew installation guide](https://krew.sigs.k8s.io/docs/user-guide/setup/install/).

Install the plugin using kubectl’s krew plugin manager:

```bash
kubectl krew install --manifest-url=https://github.com/kedify/kubectl-kedify/raw/main/.krew.yaml
```

After installation, verify it’s working:

```bash
kubectl kedify --version
```

### Updating the Plugin

To update to the latest version:

```bash
kubectl krew uninstall kedify
kubectl krew install --manifest-url=https://github.com/kedify/kubectl-kedify/raw/main/.krew.yaml
kubectl kedify -v
```

## Available Commands

The plugin provides several commands for managing Kedify:

- **status** - Show Kedify agent status and health

- **logs** - Display logs from Kedify components

- **autoscale** - Create HTTPScaledObject resources interactively

- **debug** - Low-level troubleshooting information

- **insights** - Analyze configurations for potential issues

- **dump** - Collect comprehensive diagnostic information

For detailed information about collecting diagnostic data, see [Collecting Kedify Configuration](https://docs.kedify.io/troubleshooting/collecting-kedify-configuration/).

### KPA diagnostics

Compatible plugin builds resolve a ScaledObject’s generated name against both Kubernetes HPA and Kedify KPA. `kubectl kedify debug scaledobject` reports the actual kind and HPA-compatible KPA metrics, and warns when both kinds exist during a transition. `kubectl kedify dump` best-effort collects the KPA CRD and objects, controller resources and ownership-verified logs, events, and Prometheus metrics. Missing KPA CRD access is nonfatal, so the same commands continue to work on HPA-only clusters.

## Source Code and Documentation

- **Source Code**: Browse the complete source at [https://github.com/kedify/kubectl-kedify](https://github.com/kedify/kubectl-kedify)

- **Issues and Features**: Report issues or request features at [https://github.com/kedify/kubectl-kedify/issues](https://github.com/kedify/kubectl-kedify/issues)

- **Releases**: Download releases from [https://github.com/kedify/kubectl-kedify/releases](https://github.com/kedify/kubectl-kedify/releases)

## Multi-cluster commands

Source: `kubectl-kedify` dispatcher and `multicluster.sh`, commit `0b12505ec7ea973aae7957d4a8f3895b9eebbc84`. Check `kubectl kedify --version` and command help for the installed release. These commands manage distributed member access; they do not merely connect a dashboard fleet cluster.

| Command | Arguments and behavior |
| --- | --- |
| `kubectl kedify mc setup-member NAME` | Required `--keda-kubeconfig PATH`, `--member-kubeconfig PATH`; optional `--keda-context`, `--member-context`, `--member-api-url`, `--namespace` (default `keda`), `--yes`. Creates member access resources and updates the central member kubeconfig Secret; inspect both contexts before confirming. |
| `kubectl kedify mc list-members` | `--namespace`, `--keda-context`, `--output table\|wide`; inspect configured members without changing them. |
| `kubectl kedify mc delete-member NAME` | `--namespace`, `--keda-context`, optional `--yes`; removes central registration. Quiesce dependent distributed workloads first; do not assume it deletes all remote credentials/resources. |
| `kubectl kedify mc help` | Displays the available subcommands. |

[Register members with GitOps](https://docs.kedify.io/how-to/multicluster-gitops/) is the declarative alternative; [distributed scaling](https://docs.kedify.io/features/multi-cluster-scaling/) explains the topology.

## Other command scope and errors

The dispatcher also provides `install`/`i`, `delete`/`d`, `status`/`s`, `logs`/`l`, `autoscale`/`a` (including ingress mode), `debug`/`dbg`, `insights`/`ins`, `dump`/`dmp`, version and help. Install/delete/autoscale can mutate the selected cluster; confirm the cluster context and the component’s [Helm/GitOps owner](https://docs.kedify.io/installation/helm/) before those operations.

The plugin’s `insights` command analyzes ScaledObject configuration, including polling/fallback choices. It is not hosted [Insights resource recommendations](https://docs.kedify.io/features/insights/). The documented HTTP workflow authors ScaledObjects; legacy interactive autoscale behavior must be checked against the installed plugin before using it.

For missing commands, check plugin discovery, PATH and version; for dependency errors, install the named prerequisite. For permission failures, inspect the selected context/namespace and required resource access rather than rerunning as an unbounded administrator. Use [diagnostic collection](https://docs.kedify.io/troubleshooting/collecting-kedify-configuration/) and review bundles for credentials before sharing.

---
Canonical: https://docs.kedify.io/features/kubectl-kedify-plugin/
Source: src/content/docs/features/kubectl-kedify-plugin.md
Documentation index: https://docs.kedify.io/llms.txt
