---
title: Installation guide
slug: installation-guide
description: Learn how to set up Kubeark in both online and offline installations with this comprehensive guide. From setting up the infrastructure to creating a configuration file and downloading packages or installation package image files, this document covers ever
docTags: 
createdAt: 2023-09-27T07:50:46.968Z
---

:::hint{type="info"}
This guide applies to the On-prem/Cloud deployment (customer managed) models
:::

## Step 1 - Infrastructure setup

Prior to the installation of Kubeark, it is important to ensure that the requisite infrastructure is appropriately configured. Options for this infrastructure include physical machines, virtual machines, or a private cloud solution to host the necessary resources.

**Prerequisites***:*

::::WorkflowBlock
:::WorkflowBlockItem
**Resource allocation:&#x20;**&#x41; minimum of 3 machines need to be configured
:::

:::WorkflowBlockItem
**HW/SW Requirements:** Ensure that each machine meets or exceeds the minimum hardware requirements such as CPU, RAM, and disk space.

- [Hardware Requirements](docId\:MVYi8prmPe3iZgG_ZbipK)
- [Software Requirements](docId\:A4ygr3mSyOgaUFLEqSDZi)
:::

:::WorkflowBlockItem
**Network Configuration** **and Firewall:&#x20;**&#x70;lease follow the recommended setup here

- [Network configuration & Firewall](docId\:El7fePCPQK1lovICYTbPj)
:::
::::

## Step 2 - Configuration file setup

Once the necessary infrastructure has been established, the subsequent step involves generating a configuration file. This file is a mandatory component in tailoring the Kubeark installation process to align with your organization's requirements.

::::WorkflowBlock
:::WorkflowBlockItem
**Create Configuration File**: Utilize a text editor to generate a new configuration file, ensuring it is saved with the relevant file extension, such as YAML.&#x20;
:::

:::WorkflowBlockItem
**Edit Parameters**: Incorporate the requisite settings into the configuration file to reflect the specifications of your operational environment. Such settings may include machine IP addresses, network configurations, and additional variables integral to the system's proper functioning.

- Mandatory parameters
- Optional parameters

```javascript
# Sample Kubeark Configuration File

# General Settings
name: "MyKubearkCluster"
version: "1.0.0"

# Networking
network:
  type: "flannel"
  podCIDR: "10.244.0.0/16"
  serviceCIDR: "10.96.0.0/12"

# Master Node Configurations
master_nodes:
  - hostname: "master1"
    ip: "192.168.1.101"
  - hostname: "master2"
    ip: "192.168.1.102"

# Worker Node Configurations
worker_nodes:
  - hostname: "worker1"
    ip: "192.168.1.201"
  - hostname: "worker2"
    ip: "192.168.1.202"

# Storage
storage:
  type: "local"
  path: "/var/lib/kubeark"

# Custom URL (Change this to your custom URL)
custom_url: "https://mycustom.kubeark.url"

# Additional Settings
additional_settings:
  log_level: "info"
  enable_metrics: true

```
:::

:::WorkflowBlockItem
**Save and Copy**: After customization, save the configuration file. Then securely **copy this file onto each machine** in your infrastructure setup.
:::
::::

## Step 3 - Run the Installation

### 3.1 Online installation

For an online installation of Kubeark, you will need to download specific packages and use SSH for secure data transfer and commands. The process involves both local and remote operations on your infrastructure nodes.

::::WorkflowBlock
:::WorkflowBlockItem
**Receive Custom URL**: Once your Kubeark license is activated, check your email for a message containing your unique custom URL. This URL is <font color="#2166ae">specifically generated for your organization</font> and will guide you through the online installation process. The URL would typically look like this: <font color="#2166ae">Kubeark Installer 3.0.0-beta.4566</font>
:::

:::WorkflowBlockItem
**Set permissions**:  Open your terminal and navigate to the directory where the installer binary is saved. Use the `chmod` command to set the necessary execution permissions:

```windows
chmod +x kk-*
```
:::

:::WorkflowBlockItem
**Prepare SSH Key**: Ensure you have an SSH key pair to securely communicate with your nodes. If not, generate one and then use scp to copy the private key to your first infrastructure node. This will be used to comunicate with the other nodes, as alternative you can use user/pass but is not that secure&#x20;

```windows
scp ~/.ssh/id_ecdsa kubeark@192.168.x.1:~/.ssh/id_ecdsa
```
:::

:::WorkflowBlockItem
**Transfer Configuration and Installer**: Use `scp` to copy the configuration file and installer binary to the target node.

```windows
scp online-install.yaml kubeark@192.168.x.1:~/
scp kk-3.0.0-beta.4566 kubeark@192.168.x.1:~/
```
:::

:::WorkflowBlockItem
**SSH into the Node**: Connect to the first infrastructure node using SSH. Replace 192.168.xx.xx with the IP address of the node you're connecting to:

```windows
ssh kubeark@192.168.x.1
```
:::

:::WorkflowBlockItem
**Run the Installer**: Execute the installer with the following command. This uses the transferred configuration file (e.g. *online-install.yaml*) and initiates the cluster creation process:

```windows
sudo ./kk-3.0.0-beta.4566 create cluster -f online-install.yaml -y
```
:::
::::



### 3.2 Offline (AirGapped) installation

The offline installation method is intended for environments without internet connectivity. Unlike the online installation, this method requires you to download the complete installation package image files, which are approximately 5GB in size. You'll then run the installation locally on your target infrastructure nodes.

:::::WorkflowBlock
::::WorkflowBlockItem
**Download Required Files**: Navigate to the <font color="#2166ae">Kubeark download page</font> and download the installer and image files. e.g. *kk-artifact-3.0.0-beta.4566.tar.gz*

:::hint{type="info"}
This specific download page URL will be provided to the customer through an email communication following the license activation.
:::
::::

:::WorkflowBlockItem
**Set permissions**:  Open your terminal and navigate to the directory where the installer binary is saved. Use the `chmod` command to set the necessary execution permissions.

```windows
chmod +x kk-*
```
:::

:::WorkflowBlockItem
**Transfer Files to Node**: Use a secure method, such as `scp`, to transfer the downloaded installer and image files to the first infrastructure node.

```windows
scp kk-3.0.0-beta.4566 kubeark@192.168.x.1:~/
scp kk-artifact-3.0.0-beta.4566.tar.gz kubeark@192.168.x.1:~/
```
:::

:::WorkflowBlockItem
**Prepare SSH Key**: Ensure you have an SSH key pair to securely communicate with your nodes. If not, generate one and then use `scp` to copy the private key to your first infrastructure node. This will be used to comunicate with the other nodes, as alternative you can use user/pass but is not that secure

```windows
scp ~/.ssh/id_ecdsa kubeark@192.168.x.1:~/.ssh/id_ecdsa
```
:::

:::WorkflowBlockItem
**Initialize the local container registry:&#x20;**&#x42;efore running the installer to create your cluster, you'll first initialize a local container registry and populate it with the necessary images. These commands also use the *kk-artifact-3.0.0-beta.4566.tar.gz&#x20;*&#x70;ackage, which should be located in the same directory as your *offline-install.yaml&#x20;*&#x66;ile.

```windows
sudo ./kk-3.0.0-beta.4566 init registry -f offline-install.yaml -a kk-artifact-3.0.0-beta.4566.tar.gz
```
:::

:::WorkflowBlockItem
**Push the artifact images to the registry**

```windows
sudo ./kk-3.0.0-beta.4566 artifact image push -f offline-install.yaml -a kk-artifact-3.0.0-beta.4566.tar.gz
```
:::

:::WorkflowBlockItem
**Create the cluster using the local registry and packages**

```windows
sudo ./kk-3.0.0-beta.4566 create cluster -f offline-install.yaml -a kk-artifact-3.0.0-beta.4566.tar.gz --with-packages -y
```
:::
:::::



## Step 4 - Post-installation Validation

After successfully completing the installation of Kubeark, please validate that the deployment is operational and configured as expected. This step involves accessing the custom Kubeark URL that you specified earlier in the configuration file (refer to Step 2). By doing so, you can verify that the service is accessible and functioning correctly.

![](https://api.archbee.com/api/optimize/-uoBIPXCIMlUMvNPPrDxd/IPKKh3OnyIFfU4lkcs-Ra_validation.png)

