Command line tool for reduced management and provisioning of Kubernetes clusters and environments, Helm secrets and releases.
- RMK CLI - Reduced Management for Kubernetes
This tool has been designed and developed initially by Edenlab LLC as the main CLI for managing Kodjin FHIR Server on Kubernetes clusters in different environments.
It is a wrapper around many popular CI/CD and DevOps CLI tools, including:
The main goal of the tool is to simplify ("reduce") management of Kubernetes clusters and releases.
RMK is an abbreviation which stands for "Reduced Management for Kubernetes".
RMK simplifies the start of any level of complexity of a project using Kubernetes due to the following advantages:
- Respects the GitOPS approach: Each Git branch is used as a unique identifier for determining the environment, cluster name, set of configurations and other attributes required for setting up the wrapped tools for project management in the Kubernetes environment.
- Respects the GitLabFlow workflow: Supports the standard develop, staging, production and different ephemeral (e.g, feature, release) environments.
- Provides a transparent project structure with a basic set of configurations: Allows you to correctly reuse configurations between projects and inherit project configurations from other repositories, e.g., establish parent-child ("upstream-downstream") project relationships.
- Allows a diverse team to work in the DevOPS methodology without blocking each other: Each team or multiple teams can develop and release their projects separately, later on the result of their work can be combined in a single project.
- Supports versioning of projects in a CI/CD pipeline: Each project can be versioned and referenced by static or dynamic tags (e.g., SemVer2), which guarantees stable, well-tested and predictable releases.
- Integrates with any CI/CD tool easily: The tool is a self-sufficient binary that strictly follows the 12 factor app methodology.
- Calls the CLI tools directly instead of using their libraries/SDKs: RMK executes the tools directly in a way that a typical person would do it, passing correct sets of CLI arguments and flags to the commands based on a project configuration structure. This decouples the updating of RMK itself from the wrapped CLI tools, allowing developers to utilize recent functionality and fixes.
At Edenlab LLC, RMK is used for deploying the Kodjin FHIR Server.
A classic Kodjin installation uses 3-level inheritance:
- Dependencies (upstream#1): Core components like DBs, search engines, caches, load balancers/proxies, operators etc.
- Kodjin (downstream#1): Kodjin FHIR API (REST)
- Target installation (downstream#2): Products based on Kodjin, such as UI components, user portals and middleware services.
The additional components used by Kodjin are:
- *.provisioner.infra: Repositories for Kubernetes cluster provisioning.
- helmfile.hooks.infra: Shell scrips used as Helmfile hooks in deps/Kodjin/any other tenant.
- core.charts.infra: Helm charts used by the Kodjin services.
The examples of Kubernetes providers, to which Kodjin has been installed, are:
- Amazon Elastic Kubernetes Service (EKS)
- Open Telekom Cloud - Cloud Container Engine (CCE)
- Rancher Kubernetes Platform
- Kubermatic Kubernetes Platform (KKP)
- on-premise installations deployed using Ansible Kubespray
- single-machine K3D clusters
- AWS cluster provider for RMK
- Azure cluster provider for RMK
- K3D cluster provider for RMK
- Helmfile hooks
Currently, RMK only supports Unix-like operating systems (OS):
- OS:
- MacOS: amd64, arm64 (M1, M2 require Rosetta)
- Linux: amd64
- Software:
If this is your first project repository managed by RMK, ensure that the above tools are specified in the project.yaml file.
To install RMK, run the self-installer script using the following command:
curl -sL "https://edenlabllc-rmk.s3.eu-north-1.amazonaws.com/rmk/s3-installer" | bash
Alternatively, you can go directly to https://github.com/edenlabllc/rmk/releases and download the binary.
As another option, the binary can be built from source.
To update RMK to the latest version, run the following command:
rmk update
You can update to a specific RMK version to maintain backward compatibility or when updating to the latest version is not possible.
This may be necessary due to specific version requirements or when a bug has been detected.
To update to a specific version, use the following command:
rmk update --version vX.X.X
- Reduced and simplified management of Kubernetes projects: Deploy to Kubernetes using Helmfile/Helm, use popular DevOps tools together in a single CI/CD pipeline.
- Time-proven project structure: Define the project structure using the GitLabFlow methodology.
- Hierarchies between different projects: Define upstream-downstream relationships between sibling projects to reuse releases and services across different installations.
- Batch secret management: Template, generate, and encode project secrets for all environments in a batch manner.
- Clone environments with one click: Use the special
--config-from-environment
(--cfe
) flag to create an environment based on an existing one. - Automatic detection of Multi-Factor Authentication (MFA): Automatically detect and use an MFA device if one is defined by an IAM user (must be supported by the cluster provider, e.g., AWS).
- Push-based release and downstream project updates: Easily integrate with CI/CD solutions via webhooks or workflow dispatch events to update release and service version declarations, automatically commit the changes to Git.
- Project structure generation: Generate a complete Kubernetes-based project structure from scratch using RMK, following the best practices.
- Documentation generation: Generate the full command documentation in the Markdown format with one click.
- Support for different types of code sources: Use Git when the artifact-mode is none, S3 when the artifact-mode is online, switch to fully offline installations when the artifact-mode is offline.
By design, RMK can work with any Kubernetes provider.
Among the providers are:
- Amazon Elastic Kubernetes Service (EKS)
- Google Kubernetes Engine (GKE)
- Azure Kubernetes Service (AKS)
- Red Hat OpenShift
- VMware Tanzu Kubernetes Grid
- Rancher Kubernetes Platform
- Open Telekom Cloud - Cloud Container Engine (CCE)
- Kubermatic Kubernetes Platform (KKP)
- on-premise installations deployed using Ansible Kubespray
- single-machine K3D clusters
- Guidelines for contributors: Create comprehensive guidelines for contributors, including instructions for creating pull requests (PRs).
- Integration with Helmfile vals: Integrate RMK with the vals tool for enhanced values and secret management.
- Major update of the AWS EKS cluster provider: Update the AWS EKS cluster provider to the latest versions to utilize all the supported features of the Terraform CLI and modules.
- Implementation of additional RMK cluster providers: Implement support for additional cluster providers for popular Kubernetes services such as GKE, AKS, etc.
- Offline artifact mode: Implement the offline artifact mode to install artifacts in fully isolated offline environments.
- Web documentation generator: Add an HTML documentation generator based on the .md files.
- Automatic testing of RMK during the CI/CD pipeline: Ensure that changes to the RMK codebase do not introduce errors or regressions during the CI/CD.
Check the issues for more information.
RMK is open source software (OSS) licensed under the Apache 2.0 License.