Kubemarine is an open source, lightweight and powerful management tool built for end-to-end Kubernetes cluster deployment and maintenance. It is applicable for many purposes like simple and quick onboarding Kubernetes on local and production environments in different HA schemes depending on your aims, budget, and capabilities. Together with simplicity, Kubemarine can be a very flexible and customizable tool covering specific configurability cases on both deployment and maintenance stages. This library provides powerful CLI commands, as well as can be customized using a Python extension API.
- Easy to use
- Many procedures supported following the generic maintenance approach:
- Single cluster inventory for all operations, highly customizable
- Default values of all parameters in configurations with a minimum of required parameters
- Control planes balancing with external balancers and VRRP
- Ability to resume or skip specific task without re-running entire pipeline
- Pre-built plugins out of the box and custom plugins support
- Support for executing in closed environments with private registries
- Extended logging, configs dumping
- Build supported as a package, container, and binary
- Package extension with open extension API
- Support different deployment schemes (all-in-one, mini-HA, HA, and so on)
Proceed the following steps to install Kubemarine on your environment:
- Download the binary file for your system from the latest release
- Move binary kubemarine to a separate folder
- Now you can proceed to run Kubemarine! Try the following:
kubemarine help
To install Kubemarine as package on your environment:
-
Install the latest python.
-
Upgrade pip.
Linux / MacOS:
python3 -m pip install --upgrade pip
Windows:
python -m pip install --upgrade pip
-
Ensure your environment meets the Deployment Node Prerequisites.
-
Create and activate a virtual environment if necessary.
-
Install Kubemarine package.
Linux / MacOS:
python3 -m pip install kubemarine
Windows:
python -m pip install kubemarine
-
Now you can proceed to run Kubemarine! Try the following:
kubemarine help
Installation of Kubemarine from sources is mostly similar to Kubemarine Package Installation. The exception is instead of installing the package from PyPI, do the following:
-
Download the latest release or clone the repository:
git clone https://github.com/netcracker/kubemarine.git
-
Unpack the project from the archive if required:
tar xzvf X.X.X.tar.gz
-
Navigate to the project directory:
cd kubemarine
-
Install Kubemarine package from sources.
Linux / MacOS:
python3 -m pip install -e .[ansible]
Windows:
python -m pip install -e .
-
Now you can proceed to run Kubemarine. Try the following:
kubemarine help
Note: Building from Dockerfile is also available.
Note: Kubemarine debugging available via kubemarine/__main__.py
.
To install a Kubernetes cluster using Kubemarine:
- Prepare your VMs or bare-metal machines according to Recommended Hardware Requirements and the selected Deployment Scheme. Make sure the nodes meet Cluster Nodes Prerequisites.
- Create the
cluster.yaml
inventory file, and describe your environment. Make sure that all configurations are done. For more information, see inventory configs available and examples. No need to enter all the parameters that are available, it is enough to specify the minimal identification data about the nodes where you want to install the cluster, for example:node_defaults: keyfile: "/home/username/.ssh/id_rsa" password: '{{ env.PASS }}' #Either keyfile or password can be used. username: "centos" vrrp_ips: - 192.168.0.250 nodes: - name: "k8s-control-plane-1" internal_address: "10.101.0.1" roles: ["balancer", "control-plane", "worker"] - name: "k8s-control-plane-2" internal_address: "10.101.0.2" roles: ["balancer", "control-plane", "worker"] - name: "k8s-control-plane-3" internal_address: "10.101.0.3" roles: ["balancer", "control-plane", "worker"] cluster_name: "k8s.example.com"
- Move
cluster.yaml
to the directory where Kubemarine is installed. - Verify the infrastructure:
kubemarine check_iaas
- Start the installation:
kubemarine install
- Check the health of the newly installed cluster:
kubemarine check_paas
For more information, refer to the other Kubemarine guides.
To start, download the Kubmarine image docker pull ghcr.io/netcracker/kubemarine:main
Run Kubemarine from the container, for example:
docker run -it --mount type=bind,source=/root/cluster.yaml,target=/opt/kubemarine/cluster.yaml --mount type=bind,source=/root/rsa_key,target=/opt/kubemarine/rsa_key kubemarine install -c /opt/kubemarine/cluster.yaml
Note: Do not forget to pass the inventory file and connection key inside the container. For more execution details, refer to "Installation of Kubernetes using CLI" guide on Github.
The following documents and tutorials are available:
Also, check out the following inventory examples:
If you have any problems while working with Kubemarine, feel free to open a new issue or even PR with related changes. Please follow the Contribution Guide and the process outlined in the Stack Overflow MCVE document.
In case of security concerns, please follow the Security Reporting Process
Detailed changes for each release are documented in the release notes.