This feature is in closed Beta. Contact us to request early access.
- Deploy containers to Kubernetes using the mogenius UI, without requiring deep Kubernetes knowledge. Then, add them to GitOps for deploying them to production-grade deployments.
- Configure your applications once and then deploy them to additional environments for a staged development workflow.
- Backup all your manifests to recover your cluster state in case of an incident.
GitOps setup
You can configure GitOps for each cluster. Navigate to Clusters in your organization and open the tab GitOps. Click the button to enable GitOps and open the configuration page.1
Set up Argo and Sealed Secrets
mogenius comes with a pre-configured stack for enabling GitOps consisting of two main applications:
- Argo: mogenius relies on the open-source project Argo as the GitOps engine.
- Sealed Secrets: To securely synchronize secrets with Git, mogenius uses Sealed Secrets to encrypt secrets when transferring them to Git.
Already have Argo and/or Sealed Secrets installed on your cluster? If possible, mogenius detects existing installations and updates the settings in the setup form. Check the default values and adjust them if they don’t match your installation.
2
Connect a Github repository
Your applications on a cluster will be synced with a repository on Github.
To set it up, first go to Github.com and perform the following steps:Now, in your GitOps settings in mogenius, click Connect repository and follow the steps:
To set it up, first go to Github.com and perform the following steps:
- Create a new repository and make sure it has a branch.
- Create a Personal Access Token. It requires at least
read/write
permissions onContents
. This way mogenius can commit changes on applications to the repository. If you want to use pull requests instead, make sure that the access token hasread/write
permissions forPull Requests
as well. Make sure to copy the PAT to a safe location.
You can use the same repository for multiple clusters. Your applications will be managed using the following structure for folders and files:
your-repository/mogenius/CLUSTER/APPLICATION/application.yaml
- Enter a name for the repository.
- Enter the Personal Access Token.
- Your username and a dropdown to select your repository will load. In the dropdown, search for your GitOps repository and select it.
- Set the commit behavior: By default, mogenius will commit changes directly on the branch of your application. Activate the toggle to create pull requests instead.
- Save your settings to connect the repository.
3
GitOps is now enabled for your cluster 🎉
You can proceed with creating applications.
Applications
Your workloads and resources in Kubernetes are tracked in GitOps as applications. Each application consists of one or more resources. Typical examples for how applications can be defined:- A deployment for your container, plus Ingress, Service, and Secrets that are used by the deployment.
- A platform deployment consisting of several microservices.
- Enter a name for your application. This is how it will be displayed in mogenius and it will be added as a folder to your Git repository.
- From the list of namespaces on your cluster, select the resources that you want to include in your application. You can select one namespace per application. Inside a namespace you can select all resources, or a selected list of resources.
- Confirm to create your application.
application.yaml
in your Git repository. It can take a few minutes until Argo has synchronized it, and you’ll see a loading animation in the meantime. Once it is synced, you’ll see the status of your application and all included resources.
Working with GitOps in mogenius
When workloads or resources in your Workspaces are part of an application (i.e. managed via GitOps), a status objectApplication
will be shown. This indicates the sync status of the directory and the application. If an error occurs, you can hover over the status to view the error message.
Updating workloads
You can continue using the mogenius UI to change configurations such as environment variables, resource limits, health checks, or YAML manifests on any resource. When saving changes, mogenius detects that GitOps is enabled for the resource and will update the correspondingapplication.yaml
in Git. This follows the commit behavior defined in your cluster settings (direct commit or pull request). Changes are not applied directly to the cluster but will be synced by Argo within a few minutes. You can monitor this sync using the Application status.
GitOps log
You can track the history and changes of yourapplication.yaml
using the GitOps log. It is available on any resource managed by a GitOps application and shows commits and pull requests.