<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Helm on Mike&#39;s Blog</title>
        <link>https://mikerossiter.tech/tags/helm/</link>
        <description>Recent content in Helm on Mike&#39;s Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-gb</language>
        <lastBuildDate>Thu, 03 Apr 2025 13:04:14 +0100</lastBuildDate><atom:link href="https://mikerossiter.tech/tags/helm/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>Tutorial How to Use Gitlab Package Registry as a Helm Chart Repository</title>
        <link>https://mikerossiter.tech/posts/tutorial-how-to-use-gitlab-package-registry-as-a-helm-chart-repository/</link>
        <pubDate>Mon, 03 Oct 2022 12:12:30 +0100</pubDate>
        
        <guid>https://mikerossiter.tech/posts/tutorial-how-to-use-gitlab-package-registry-as-a-helm-chart-repository/</guid>
        <description>&lt;img src="https://mikerossiter.tech/helmandgitlab.png" alt="Featured image of post Tutorial How to Use Gitlab Package Registry as a Helm Chart Repository" /&gt;&lt;h1 id=&#34;how-to-use-gitlab-package-registry-as-a-helm-chart-repository-august-2022&#34;&gt;How to use Gitlab Package Registry as a Helm Chart Repository (August 2022)
&lt;/h1&gt;&lt;p&gt;I have seen a few blog posts cover this area but I had to make some minor changes in order to get the examples to work. Here is my edit. I have dated the title as I am under no illusion that things may change and features will be added as is so often the case. I have used a combination of steps produced here: &lt;a class=&#34;link&#34; href=&#34;https://docs.gitlab.com/ee/user/packages/helm_repository/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://docs.gitlab.com/ee/user/packages/helm_repository/&lt;/a&gt; and from other sites. These steps are run from a Linux machine.&lt;/p&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites
&lt;/h2&gt;&lt;p&gt;For this tutorial you need to install:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Minikube&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Helm&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;and have a working &lt;a class=&#34;link&#34; href=&#34;https://www.gitlab.com&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;GitLab&lt;/a&gt; account.&lt;/p&gt;
&lt;h2 id=&#34;tutorial&#34;&gt;Tutorial
&lt;/h2&gt;&lt;p&gt;So first head towards a folder in your local terminal where you can create an example Helm project:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helm create example
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will create a folder called “example” in the directory that you are in and within that directory will be all the requirements for a basic Helm deployment. Feel free to have a look around.&lt;/p&gt;
&lt;p&gt;Then create a new project in GitLab called “example”.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://mikerossiter.tech/repoblankproj.png&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Create Example Project&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;Leave all the defaults as is for now. This is just a test.&lt;/p&gt;
&lt;p&gt;Then add your repo locally. This is the one that Helm will use to replicate your charts across your projects. For this you will need the Project ID from your project. This is located at the top of the page under the project title:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://mikerossiter.tech/repoexampleno.png&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Example project ID&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;You can click the clipboard image to the right of the ID to copy it to the clipboard.&lt;/p&gt;
&lt;p&gt;You will also need to create a Personal Access Token. To do this click on your little person icon in the top right of the screen and select Preferences.&lt;/p&gt;
&lt;p&gt;Then select Access Tokens on the left of the screen.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://mikerossiter.tech/repoaccesstokens.png&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;GitLab access tokens&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;Give your token a name (any will do), an expiration date and a scope of “api” or whatever you feel comfortable with. You might wish to use this token for other work. I don’t know. It’s your token.&lt;/p&gt;
&lt;p&gt;Don’t forget to copy the name of the token as this is now your password! Otherwise you will have to follow these steps again. Boring.&lt;/p&gt;
&lt;p&gt;Then run the Helm repo add command with this URL replacing the relevant fields such as username, password-token and project_ID:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helm repo add --username &amp;lt;username&amp;gt; --password &amp;lt;password-token&amp;gt; example https://gitlab.com/api/v4/projects/&amp;lt;project ID&amp;gt;/packages/helm/stable
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img src=&#34;https://mikerossiter.tech/repoadd.png&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Repo added&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;Now move into the “example” folder in your terminal:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cd example
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Package the contents of the folder:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;helm&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;package&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now install the Chart Museum plugin to push the package to the registry. Don’t worry. This still sends your package to your GitLab repo and not someone elses! For some reason the builtin Helm push command didn’t work for me and required an &lt;strong&gt;OCI://&lt;/strong&gt; path. This command will copy your newly made Tarball of your Helm folder and put it in the package registry in your GitLab repo:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helm plugin install https://github.com/chartmuseum/helm-push.git
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helm cm-push example-0.1.0.tgz example
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In your GitLab project window, head to Packages &amp;amp; Registries on the left hand side and select Package Registry. As if by magic, it should now be there.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://mikerossiter.tech/repopackageregistry.png&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Package added&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;Now check your repo is installed and listed:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helm repo list
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It should list the NAME example and URL that you passed earlier with the Helm repo add command.&lt;/p&gt;
&lt;p&gt;Start your local cluster:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;minikube start
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Install your Helm chart:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;helm install example example/example
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Check that the Helm chart has deployed.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;k get deploy -A
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;And so there it is! I really hope this has helped you. If you run into an issue then just let me know via the various social media icons beneath my avatar on the left. If this did help you then feel free to &lt;a class=&#34;link&#34; href=&#34;https://www.buymeacoffee.com/mikerossiter&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Buy Me A Coffee&lt;/a&gt;!&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
