Skip to content
185 changes: 185 additions & 0 deletions docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,191 @@ The default configuration values are sufficient for most deployments. The
[documentation](https://charts.kubewarden.io/#configuration) describes all the
options.

### Install kwctl (Kubewarden CLI)

#### Install for Linux

##### Using Homebrew
```bash
brew install kwctl
```
- Verify Installation:
```bash
kwctl --version
```

##### Manual Installation
###### **Step 1: Download `kwctl`**
Download the latest release of `kwctl` for Linux:
```bash
curl -LO https://github.com/kubewarden/kwctl/releases/latest/download/kwctl-linux-x86_64.zip
```

- For **ARM64** systems (e.g., Raspberry Pi), use:
```bash
curl -LO https://github.com/kubewarden/kwctl/releases/latest/download/kwctl-linux-aarch64.zip
```

###### **Step 2: Extract the Files to new folder**
Extract the downloaded `.zip` file to new folder `kwctl-linux` :
```bash
unzip kwctl-linux-x86_64.zip -d ./kwctl-linux
```

This will extract the following files:
- `kwctl-linux-x86_64`: The `kwctl` binary.
- `kwctl-linux-x86_64.sig`: A signature file for verifying the binary.
- `kwctl-linux-x86_64.pem`: A certificate file for verifying the signature.

###### **Step 3: Go to the new directory `kwctl-linux`**
```shell
cd ./kwctl-linux
```

###### **Step 4: Make the Binary Executable**
Set the executable permission for the `kwctl` binary which is file `kwctl-linux-x86_64`:
```bash
chmod +x kwctl-linux-x86_64
```

###### **Step 5: Move the Binary to `/usr/local/bin`**
Move the binary to a directory in your `PATH`:
```bash
sudo mv kwctl-linux-x86_64 /usr/local/bin/kwctl
```

###### **Step 6: Verify the Installation**
Check if `kwctl` is installed correctly:
```bash
kwctl --version
```

#### Install for Apple
##### Using Homebrew
- Install `kwctl`
```shell
brew install kwctl
```

- Verify Installation:
```bash
kwctl --version
```

##### Manual Installation
###### **Step 1: Download `kwctl`**
Download the latest release of `kwctl` for macOS:
```bash
curl -LO https://github.com/kubewarden/kwctl/releases/latest/download/kwctl-darwin-x86_64.zip
```

- For **Apple Silicon (ARM64)** systems, use:
```bash
curl -LO https://github.com/kubewarden/kwctl/releases/latest/download/kwctl-darwin-aarch64.zip
```

###### **Step 2: Extract the Files**
Extract the downloaded `.zip` file:
```bash
unzip kwctl-darwin-x86_64.zip -d ./kwctl-darwin
```

This will extract the following files:
- `kwctl-darwin-x86_64`: The `kwctl` binary.
- `kwctl-darwin-x86_64.sig`: A signature file for verifying the binary.
- `kwctl-darwin-x86_64.pem`: A certificate file for verifying the signature.

###### **Step 3: Go to the new directory `kwctl-darwin`**
```shell
cd ./kwctl-darwin
```

###### **Step 4: Make the Binary Executable**
Set the executable permission:
```bash
chmod +x kwctl-darwin-x86_64
```

###### **Step 5: Move the Binary to `/usr/local/bin`**
Move the binary to a directory in your `PATH`:
```bash
sudo mv kwctl-darwin-x86_64 /usr/local/bin/kwctl
```

###### **Step 6: Verify the Installation**
Check if `kwctl` is installed correctly:
```bash
kwctl --version
```

#### Install for Windows
##### **Step 1: Download `kwctl`**
1. Open your browser and go to the [Kubewarden releases page](https://github.com/kubewarden/kwctl/releases/latest).

2. Download the `kwctl-windows-x86_64.zip` file.

##### **Step 2: Extract the Files in a new folder `kwctl-windows`**
Extract the `.zip` file. It will contain:
- `kwctl-windows-x86_64.exe`: The `kwctl` binary.
- `kwctl-windows-x86_64.sig`: A signature file for verifying the binary.
- `kwctl-windows-x86_64.pem`: A certificate file for verifying the signature.

##### **Step 3: Rename the Binary**
Rename the binary file from `kwctl-windows-x86_64.exe` to `kwctl.exe` for easier use.

##### **Step 4: Add path of `kwctl-windows` to Your PATH**
- Add the directory containing `kwctl-windows-x86_64.exe` to your `PATH` environment variable:
- Open **System Properties** > **Environment Variables**.
- Edit the `Path` variable and add the directory containing `kwctl-windows-x86_64.exe`.

##### **Step 5: Verify the Installation**
Open a new Command Prompt or PowerShell window and check if `kwctl` is installed correctly:
```cmd
kwctl --version
```




#### **Install Shell Completions**
Feature that allow auto-complete commands for `kwctl` by pressing the `Tab` key.

##### **For Bash**
```bash
kwctl completions --shell bash > ~/.bash_completion
source ~/.bash_completion
```

##### **For Zsh**
```bash
kwctl completions --shell zsh > ~/.zshrc
source ~/.zshrc
```

##### **For PowerShell**
```powershell
kwctl completions --shell powershell > $PROFILE
. $PROFILE
```

If you encounter the following error in Windows:
```powershell
Line |
71 | … [CompletionResultType]::ParameterName, 'How long the bench ‘should'’ …
| ~
| Missing ')' in method call.
```

1. Open `$PROFILE` in any editor.
2. Replace `'How long the bench ‘should'’ run` with `'How long the bench should run'`.
3. Save the file.
4. Re-run the command:
```powershell
. $PROFILE
```



## Main components

Kubewarden has three main components which you will interact with:
Expand Down