kubectl-ka Plugin Installation
The kubectl-ka
plugin provides a command-line interface to interact with KubeArchive, allowing you to retrieve
archived Kubernetes resources and logs from your KubeArchive installation.
Prerequisites
-
kubectl
installed and configured to access your Kubernetes cluster -
A running KubeArchive installation in your cluster
-
Appropriate RBAC permissions to access the KubeArchive API
Installation Methods
Download from GitHub Releases
The easiest way to install the kubectl plugin is to download a pre-built binary from the GitHub releases page.
-
Download the binary for your platform:
# For Linux AMD64 curl -LO {download-path}/kubectl-ka-linux-amd64 # For Linux ARM64 curl -LO {download-path}/kubectl-ka-linux-arm64
-
Make the binary executable:
chmod +x kubectl-ka-*
-
Move the binary to your PATH:
# Example: move to /usr/local/bin (requires sudo) sudo mv kubectl-ka-linux-amd64 /usr/local/bin/kubectl-ka # Or move to a directory in your user PATH mkdir -p ~/.local/bin mv kubectl-ka-linux-amd64 ~/.local/bin/kubectl-ka
-
Verify the installation:
kubectl ka version
Build from Source
If you prefer to build the plugin from source:
-
Clone the repository:
git clone https://github.com/kubearchive/kubearchive.git cd kubearchive
-
Build the plugin:
go build -o kubectl-ka ./cmd/kubectl-ka/
-
Move the binary to your PATH:
mv kubectl-ka ~/.local/bin/ # or sudo mv kubectl-ka /usr/local/bin/