{"id":305334,"date":"2021-07-22T12:00:01","date_gmt":"2021-07-22T09:00:01","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-migrate-away-from-gitlab-managed-kubernetes-apps-cloudsavvy-it\/"},"modified":"2021-07-22T12:00:01","modified_gmt":"2021-07-22T09:00:01","slug":"how-to-migrate-away-from-gitlab-managed-kubernetes-apps-cloudsavvy-it","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-migrate-away-from-gitlab-managed-kubernetes-apps-cloudsavvy-it\/","title":{"rendered":"#How to Migrate Away From GitLab Managed Kubernetes Apps \u2013 CloudSavvy IT"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a3ccb7525aaa\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a3ccb7525aaa\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-migrate-away-from-gitlab-managed-kubernetes-apps-cloudsavvy-it\/#Moving_Away_From_Managed_Apps\" >Moving Away From Managed Apps<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-migrate-away-from-gitlab-managed-kubernetes-apps-cloudsavvy-it\/#Gaining_Control_of_Your_Apps\" >Gaining Control of Your Apps<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-migrate-away-from-gitlab-managed-kubernetes-apps-cloudsavvy-it\/#Upgrading_to_GitLabs_New_Cluster_Apps_Model\" >Upgrading to GitLab\u2019s New Cluster Apps Model<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-migrate-away-from-gitlab-managed-kubernetes-apps-cloudsavvy-it\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#How to Migrate Away From GitLab Managed Kubernetes <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">App<\/a>s \u2013 CloudSavvy IT&#8221;<\/strong><\/p>\n<div id=\"article-content-area\">\n<img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage aligncenter size-full wp-image-9546\" srcset=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/02\/266bb4cf.jpg?width=398&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 400w, https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/02\/266bb4cf.jpg?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 1200w\" sizes=\"auto, 400w, 1200w\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/02\/266bb4cf.jpg?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Graphic showing the GitLab logo, a stylised fox head\" width=\"1602\" height=\"902\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>GitLab Managed Apps was a feature of the platform\u2019s Kubernetes integration that provided one-click installation of common cluster apps. This iteration of the feature was deprecated during the GitLab 13 release cycle and removed entirely in June\u2019s 14.0 release. Here\u2019s how to migrate your Managed Apps to a supported deployment model.<\/p>\n<h2 id=\"moving-away-from-managed-apps\"><span class=\"ez-toc-section\" id=\"Moving_Away_From_Managed_Apps\"><\/span>Moving Away From Managed Apps<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Managed Apps were developed as a way to simplify getting up and running with a new Kubernetes cluster. GitLab provided templates for applications such as NGINX Ingress, Cert Manager and Prometheus.<\/p>\n<p>Two different installation methods were offered: one-click and CI\/CD. The one-click method provided a UI within GitLab that listed available apps and let you click to install. Some apps also exposed basic configuration settings. The CI\/CD method offered a GitLab CI template to add apps to a cluster as part of a pipeline.<\/p>\n<p>One-click installs are now gone altogether. The CI method remains functional but is deprecated and <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/docs.gitlab.com\/ee\/user\/clusters\/applications.html\">will be removed<\/a> in GitLab 15.0. Although Managed Apps drastically simplified installation, they <em>only<\/em> catered for this stage of the cluster\u2019s lifecycle. Apps were either installed or uninstalled, so you\u2019d quickly need to move to regular Kubernetes management tools to perform maintenance and customization.<\/p>\n<p>Despite the feature\u2019s removal, existing Managed App installs will continue to function in GitLab 14.0. You can safely upgrade GitLab without worrying about downtime in your cluster. Upgrading will remove the Managed Apps UI though, so you\u2019ll be unable to view or uninstall apps from within GitLab.<\/p>\n<h2 id=\"gaining-control-of-your-apps\"><span class=\"ez-toc-section\" id=\"Gaining_Control_of_Your_Apps\"><\/span>Gaining Control of Your Apps<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Migrating away from Managed Apps doesn\u2019t necessarily require any im<a href=\"https:\/\/buradabiliyorum.com\/en\/category\/social-mediaa\/\" data-internallinksmanager029f6b8e52c=\"1\" title=\"Social Media\" target=\"_blank\" rel=\"noopener\">media<\/a>te action on your part. As your apps will remain operational, you can leave them as-is if you\u2019re happy with them staying in the <code>gitlab-managed-apps<\/code> namespace.<\/p>\n<p>As the apps are simply Helm deployments in your cluster, you can manage them using the <code>kubectl<\/code> and <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/helm.sh\">Helm<\/a> command-line binaries. They\u2019ll show up as regular Kubernetes resources.<\/p>\n<p>You can list cluster resources which were installed by GitLab using this Kubectl command:<\/p>\n<pre>kubectl get all -n gitlab-managed-apps<\/pre>\n<p>This lets you check what\u2019s running in your cluster in the absence of GitLab\u2019s old \u201cApplications\u201d page.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12784\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/07\/682a0d70.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1225\" height=\"484\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>You might encounter issues with apps installed by old GitLab versions. These may have been added using Helm v2, which isn\u2019t compatible with modern Helm v3 clients. If you\u2019re not sure whether you\u2019ve got v2 apps installed, use the following command to check:<\/p>\n<pre>kubectl get all -n gitlab-managed-apps | grep 'helm.sh\/release'<\/pre>\n<p>Apps which <strong>are<\/strong> shown in this command\u2019s output were installed by Helm v3. Compare the list against the earlier <code>get all<\/code> command to identify apps added by Helm v2.<\/p>\n<p>If it turns out your apps are using Helm v2, you\u2019ll need to manually walk-through the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/helm.sh\/docs\/topics\/v2_v3_migration\">Helm migration guide<\/a> to bring them up-to-date. It\u2019s recommended you move to Helm v3 if you\u2019ll be retaining the apps long-term. As an alternative, <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/v2.helm.sh\/docs\/install\">installing Helm v2<\/a> on your machine will let you interact with the apps to apply immediate fixes and maintenance.<\/p>\n<h2 id=\"upgrading-to-gitlabs-new-cluster-apps-model\"><span class=\"ez-toc-section\" id=\"Upgrading_to_GitLabs_New_Cluster_Apps_Model\"><\/span>Upgrading to GitLab\u2019s New Cluster Apps Model<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The overriding objective of Managed Apps \u2013 simplifying cluster setup \u2013 hasn\u2019t been completely cast aside by GitLab. GitLab 14.0 focuses on cluster \u201cmanagement projects\u201d as a new deployment model for cluster provisioning.<\/p>\n<p>GitLab provides a <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/docs.gitlab.com\/ee\/user\/clusters\/management_project_template.html\">project template<\/a> which you can use to install apps into Kubernetes clusters. This addresses the original issues with Managed Apps by ensuring you\u2019ve got full control over the Helm charts which are deployed. You clone the template, connect the project to your cluster, then edit and delete the individual app charts as necessary. Running a CI pipeline will deploy the selected apps to your cluster.<\/p>\n<p>You can <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/docs.gitlab.com\/ee\/user\/clusters\/migrating_from_gma_to_project_template.html\">migrate existing<\/a> Managed Apps to the management project format. This lets you continue operating them using a GitLab-endorsed approach. We\u2019ll assume you\u2019ve already got a Kubernetes cluster connected to your GitLab instance, by virtue of your existing deployments.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12781\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/07\/2e6759f3.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1268\" height=\"648\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Begin by creating a new GitLab project using the plus button in the top-right. Click \u201cCreate from template\u201d, then scroll down to the \u201cGitLab Cluster Management\u201d template. Click the \u201cUse template\u201d button. On the next screen, give your project a name and press \u201cCreate project.\u201d<\/p>\n<p>The template provides a <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/watch-movies-tv-seriess\/\" data-internallinksmanager029f6b8e52c=\"8\" title=\"Watch Movies &amp; TV Series\" target=\"_blank\" rel=\"noopener\">series<\/a> of Helm charts to deploy apps into your cluster. The individual app charts are stored in the <code>applications<\/code> directory. Each app gets its own subdirectory.#<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12782\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/07\/71e7822e.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1268\" height=\"648\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Begin by editing <code>helmfile.yaml<\/code> in the root of your project, either in the GitLab Web IDE or by cloning the repository using Git. This file references the individual application templates. Enable the applications you\u2019re using by uncommenting the relevant lines. In this example, we\u2019ve previously installed Ingress and Cert Manager as GitLab Managed Apps, so we\u2019re enabling them in the cluster management project.<\/p>\n<p>Next you need to work out which chart version is already deployed to your cluster. This step is important so you don\u2019t unintentionally replace your app with a different version.<\/p>\n<p>You can get an app\u2019s version by running <code>helm ls -n gitlab-managed-apps<\/code>. Look for the app in the output table and note down the version displayed in the <code>CHART<\/code> column. This will take the format <code>app-name-X.Y.Z<\/code>; you only need the <code>X.Y.Z<\/code> part.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12788\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/07\/525868fe.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1738\" height=\"199\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Return to your new GitLab project and open the <code>helmfile.yaml<\/code> associated with the application, such as <code>applications\/ingress\/helmfile.yaml<\/code>. Change the <code>version<\/code> field to match the version you noted down.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12783\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/07\/83c34a76.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1268\" height=\"648\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Finally, replace the default <code>values.yaml<\/code> with your existing set of Helm values. Use Helm to load the YAML representation of your app\u2019s values file:<\/p>\n<pre>helm get values ingress -n gitlab-managed-apps -a --output yaml<\/pre>\n<p>Substitute <code>ingress<\/code> with the name of your app\u2019s deployment. Copy the entire YAML output and use it to overwrite the <code>applications\/ingress\/values.yaml<\/code> file. Make sure to adjust the file path to match your app. Now you\u2019re ready to run the cluster management project deployment.<\/p>\n<p>\u00a0<\/p>\n<p>A deployment pipeline will start automatically when you merge your changes into the default branch (which is usually <code>main<\/code> for new projects in GitLab 14.0). Use Git to commit your changes and merge them in:<\/p>\n<pre>git checkout -b my-branch&#13;\ngit add .&#13;\ngit commit -m \"Migrate existing GitLab Managed Apps\"&#13;\ngit checkout main&#13;\ngit merge my-branch&#13;\ngit push -u origin main<\/pre>\n<p>The pipeline will run. If the template changes were correct, there should be no impact on your running applications. Some harmless metadata <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/docs.gitlab.com\/ee\/user\/clusters\/migrating_from_gma_to_project_template.html\">might be modified<\/a> as the deployment mechanism changes.<\/p>\n<p>You\u2019re now ready to use the cluster management project for the ongoing maintenance of your apps. As an example, you could update to a new version of an app by editing the <code>version<\/code> field in its <code>helmfile.yaml<\/code>. Merging the change into <code>main<\/code> would prompt Helm to apply the changes inside your cluster.<\/p>\n<h2 id=\"conclusion\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>GitLab Managed Apps helped many users to take their first steps with Kubernetes. The feature\u2019s simplicity ultimately proved too limiting though, so it\u2019s now being removed in a multi-step process.<\/p>\n<p>Fortunately, it\u2019s quite straightforward to complete your migration away from Managed Apps. There\u2019s nothing special about them \u2013 they\u2019re simply regular Helm deployments which happen to live in your cluster\u2019s <code>gitlab-managed-apps<\/code> namespace. This means your workloads will remain available even if you upgrade to GitLab 14.0, leaving you free to transition at your own pace.<\/p>\n<p>Moving forwards, cluster management projects are the preferred approach for using GitLab to install popular apps on Kubernetes. While a little more technically demanding, this model gives you much more control and helps you manage your infrastructure as code.\n<\/p><\/div>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.cloudsavvyit.com\/12780\/how-to-migrate-away-from-gitlab-managed-kubernetes-apps\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#How to Migrate Away From GitLab Managed Kubernetes Apps \u2013 CloudSavvy IT&#8221; GitLab Managed Apps was a feature of the platform\u2019s Kubernetes integration that provided one-click installation of common cluster apps. This iteration of the feature was deprecated during the GitLab 13 release cycle and removed entirely in June\u2019s 14.0 release. Here\u2019s how to migrate&#8230;<\/p>\n","protected":false},"author":1,"featured_media":305335,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/02\/266bb4cf.jpg","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-305334","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/305334","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=305334"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/305334\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/305335"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=305334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=305334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=305334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}