Kelvin Provision CLI¶
On this page you will learn what the kelvin-provision command line tool can do on the Edge System and what every command and option does.
Warning
The kelvin-provision CLI is only available when you let Kelvin install the k3s cluster. If you use your own Kubernetes cluster, the tool is not installed on the Edge System.
Overview¶
kelvin-provision is the command line tool that is installed on the Edge computer or VM together with the Kelvin k3s cluster.
It has more features than the Edge UI and Edge API, and is designed for power users working directly on the Edge System.
With it you can;
- Manage Workloads, including deploy, start, stop, delete and read logs
- Apply pending Kelvin upgrades and upgrade k3s
- Convert a Cluster to run in high availability mode (HA)
- Join, list and remove Nodes
- Read the Cluster and installation information
- Generate a report of the system and installation
- Manage the Wireguard interface
- Install or remove the provision installation
Getting Help¶
Type the command with the --help option to see everything that is available.
| Kelvin Provision Command Line Example | |
|---|---|
You can read the help of any command by typing the command and then --help.
| Kelvin Provision Command Line Example | |
|---|---|
Global Flags¶
These flags are available on every command.
| Flag | Description |
|---|---|
--debug |
Show debug logs |
-d, --dry-run |
Just print the commands without executing them |
-k, --insecure |
Skip SSL verification |
-o, --omit-stdout |
Omit StdOut from bash scripts |
-h, --help |
Show the help of the command |
Commands¶
| Command | Description |
|---|---|
cluster |
Commands related with the Cluster |
nodes |
Manage the Cluster Nodes |
workloads |
Manage Workloads |
init |
Start the provision installation process |
reset |
Remove everything related to provision from the system |
show |
Print the current installation configuration |
version |
Show the kelvin-provision version information |
report |
Generate a report of the current system and installation |
wireguard |
Manage the Wireguard interface |
Cluster¶
Commands related with the Cluster.
| Kelvin Provision Command Line Example | |
|---|---|
| Command | Description |
|---|---|
cluster apply |
Apply a pending upgrade |
cluster status |
Return the current upgrade status |
cluster info |
Retrieve the Cluster information |
cluster ha |
Convert the Cluster to run in high availability mode (HA) |
cluster k3s |
Manage the k3s version across the Cluster |
Apply a Pending Upgrade¶
kelvin-provision cluster apply applies a pending upgrade.
| Kelvin Provision Command Line Example | |
|---|---|
Read how to download and apply upgrades in Upgrade a Cluster.
Upgrade Status, Information and High Availability¶
kelvin-provision cluster statusreturns the current upgrade statuskelvin-provision cluster inforetrieves the Cluster informationkelvin-provision cluster haconverts the Cluster to run in high availability mode (HA)
Manage the k3s Version¶
kelvin-provision cluster k3s manages the k3s version across the Cluster.
| Command | Description |
|---|---|
cluster k3s status |
Show the current and target k3s versions for every Node |
cluster k3s upgrade |
Upgrade k3s on this Node and then every worker Node |
| Kelvin Provision Command Line Example | |
|---|---|
Read the full steps in Upgrade a Cluster.
Nodes¶
Manage the Nodes of the Cluster.
| Command | Description |
|---|---|
nodes info |
Retrieve the information needed to join a Node |
nodes join |
Join a Node to a Cluster |
nodes list |
List the Cluster Nodes |
nodes remove |
Remove a Node from the Cluster |
nodes k3s upgrade |
Upgrade k3s on this Node only, and normalize its config |
nodes info, nodes list and nodes remove can only be executed on the main Cluster Node.
nodes join cannot be executed on the main Cluster Node.
Join a Node¶
kelvin-provision nodes join joins a Node to a Cluster.
| Flag | Description |
|---|---|
-a, --address |
IP address of the main Cluster Node. Or envvar: KLVN_ADDRESS |
-t, --token |
Join token. Or envvar: KLVN_TOKEN |
-c, --confirm |
Ask to confirm the target Cluster. Or envvar: KLVN_CONFIRM |
--ha |
Join in high availability mode (HA) |
--kubelet-arg |
Set custom or override underlying kubelet arguments |
-p, --pre-actions |
Disable pre actions to be executed before the installation. Or envvar: KLVN_PREACTIONS |
--registry-config |
Containerd mirror configuration, as printed by nodes join-info. Or envvar: KLVN_REGISTRY_CONFIG |
--resolv-conf |
Use the host resolv.conf file |
Remove a Node¶
kelvin-provision nodes remove --name {Worker Node Name} removes a Node from the Cluster.
| Flag | Description |
|---|---|
-n, --name |
Node name. Or envvar: KLVN_NAME |
Read the full steps in Delete Node in a Cluster.
Upgrade k3s on One Node¶
kelvin-provision nodes k3s upgrade upgrades k3s on this Node only, and normalizes its config.
| Flag | Description |
|---|---|
--registry-config |
Containerd mirror configuration, as printed by nodes join-info. Or envvar: KLVN_REGISTRY_CONFIG |
Workloads¶
Manage the Workloads that run on the Cluster.
| Command | Description | Read more |
|---|---|---|
workloads import |
Deploy a Workload from a file | Deploy Workload |
workloads list |
List the Workloads and their current status | Deploy Workload |
workloads start |
Start a Workload | Start / Stop Workload |
workloads stop |
Stop a Workload | Start / Stop Workload |
workloads delete |
Delete a Workload | Delete Workload |
workloads apply |
Apply a ready Workload | |
workloads logs |
Print the Workload logs |
Most Workload commands take the Workload name with the -n (--name) flag.
| Kelvin Provision Command Line Example | |
|---|---|
Workload Command Flags¶
| Command | Flag | Description |
|---|---|---|
workloads import |
-f, --file |
The file to be imported. Or envvar: KLVN_FILE |
workloads delete |
-s, --staged |
Delete only the staged version of the Workload |
workloads logs |
-f, --follow |
Follow the log stream |
workloads logs |
-t, --timestamps |
Show the timestamp at the beginning of every line |
workloads logs |
-p, --previous |
Return the logs of the previous terminated container |
workloads logs |
-c, --container |
Choose a container to retrieve the logs from. Options are the Workload name (default), mqtt and gateway |
Init¶
kelvin-provision init starts the provision installation process. It installs all the necessary tools and applications to run a Cluster on the edge side.
The minimum system requirements are;
- Internet access
- 2 CPUs
- 2048 MB of memory
| Flag | Description |
|---|---|
-n, --name |
Set the provision Cluster name (ignored when using the service account token flag). Or envvar: KLVN_NAME |
-t, --title |
Set the provision Cluster display name. Or envvar: KLVN_TITLE |
-u, --url |
Set the server URL. Or envvar: KLVN_URL |
--data-dir |
Set the k3s data dir (default: /var/lib/rancher/k3s). Or envvar: KLVN_DATADIR |
--auto |
Do not ask questions. Use the hostname as the Cluster name and display name. Or envvar: KLVN_AUTO |
--username |
Set the authentication username. Or envvar: KLVN_USERNAME |
--password |
Set the authentication password. Or envvar: KLVN_PASSWORD |
--totp |
The time-based one-time password (TOTP) corresponding to the provided user |
-s, --service-account-token |
Use a service account token authentication (username and password override this). Or envvar: KLVN_SAT |
--kubelet-arg |
Set custom or override underlying kubelet arguments |
--resolv-conf |
Use the host resolv.conf file |
--ha |
Enable high availability mode (HA) |
For the full installation steps, see Provision a K3S Cluster.
Reset¶
kelvin-provision reset removes everything related to provision from the system.
Warning
This removes the provision installation from the Edge System. Use the --keep-data flag if you want to keep the storage created by the Workloads.
| Flag | Description |
|---|---|
--keep-data |
Do not remove the storage created by the Workloads. Or envvar: KLVN_KEEPDATA |
--auto |
Do not ask questions and/or authentication credentials. Or envvar: KLVN_AUTO |
--username |
Set the authentication username. Or envvar: KLVN_USERNAME |
--password |
Set the authentication password. Or envvar: KLVN_PASSWORD |
--totp |
The time-based one-time password (TOTP) corresponding to the provided user |
-s, --service-account-token |
Use a service account token authentication (username and password override this). Or envvar: KLVN_SAT |
Show¶
kelvin-provision show prints the current installation configuration.
| Kelvin Provision Command Line Example | |
|---|---|
| Flag | Description |
|---|---|
-f, --format |
Select the output format, YAML or JSON (default YAML) |
Version¶
kelvin-provision version shows the kelvin-provision version information.
| Kelvin Provision Command Line Example | |
|---|---|
Report¶
kelvin-provision report generates a report of the current system and installation.
| Kelvin Provision Command Line Example | |
|---|---|
Wireguard¶
Manage the Wireguard interface.
| Command | Description |
|---|---|
wireguard info |
Show the current Wireguard interface information |
wireguard recreate |
Start and/or recreate the Wireguard interface |