In Netcracker, we build and deliver enterprise-grade cloud ecosystems based on Kubernetes to our customers. Such solutions consist of both enterprise Kubernetes, which we prepare and maintain using the appropriate tools and many managed infrastructure cloud services, such as PostgreSQL, Cloud Streaming, Cloud Queues, etc. Kubemarine is one of these tools we created to solve engineering challenges, and now we are making it Opensource.
Kubemarine is an open source, lightweight and powerful management tool built for end-to-end Kubernetes cluster deployment and maintenance.
It's 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 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 via Python extension API.
The tool should be helpful for Cloud and DevOps engineers.
- Easy to use
- Many procedures supported: install, add_node, remove_node, upgrade, backup, restore, check_iaas, check_paas, manage_psp.
- 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, etc.)
1 Install latest python3
2 Upgrade pip:
python3 -m pip install --upgrade pip
3 Ensure your environment meets Deployment Node Prerequisites
4 Download the latest release or clone the repo:
git clone https://github.com/netcracker/kubemarine.git
5 Unpack project from archive if required
tar xzvf X.X.X.tar.gz
6 Navigate to project directory:
7 Install Python dependencies
python3 -m pip install -r requirements.txt
8 Optionally add Kubemarine to PATH. You can do this by adding symlink to
sudo ln -s $(pwd)/bin/kubemarine /usr/local/bin/kubemarine sudo chmod +x /usr/local/bin/kubemarine
Alternatively, if you do not have root privileges, you can update your PATH in *rc file. Example:
echo "export PATH=\$PATH:$(pwd)/bin" >> ~/.bashrc source ~/.bashrc
If you don't want to add something to path, you can execute the Kubemarine directly from bin location:
Now you can proceed to run Kubemarine! Try the following:
kubemarine [help](kubemarine help)
Note: building from Dockerfile is also available.
Note: Kubemarine debugging available via
Proceed the following steps to install Kubernetes cluster using Kubemarine:
- Prepare your VMs or bare-metal machines according to Recommended Hardware Requirements and selected Deployment Scheme. Make sure the nodes meet Cluster Nodes Prerequisites
- Create inventory file
cluster.yamland describe your env and everything should be configured. See inventory configs available and examples. No need to fill in 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" username: "centos" vrrp_ips: - 192.168.0.250 nodes: - name: "k8s-control-plane-1" address: "10.101.0.1" internal_address: "192.168.0.1" roles: ["balancer", "control-plane", "worker"] - name: "k8s-control-plane-2" address: "10.101.0.2" internal_address: "192.168.0.2" roles: ["balancer", "control-plane", "worker"] - name: "k8s-control-plane-3" address: "10.101.0.3" internal_address: "192.168.0.3" roles: ["balancer", "control-plane", "worker"] cluster_name: "k8s.example.com"
- Move cluster.yaml to the directory, where Kubemarine installed
- Start installation
In the Kubemarine repository, you'll find more guides for: