{"id":22472,"date":"2023-10-15T04:22:23","date_gmt":"2023-10-15T04:22:23","guid":{"rendered":"https:\/\/linuxways.net\/?p=22472"},"modified":"2023-10-19T02:14:08","modified_gmt":"2023-10-19T02:14:08","slug":"add-update-remove-helm-repositories","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/best-of-linux\/add-update-remove-helm-repositories\/","title":{"rendered":"How to Add, Update, or Remove Helm Repositories"},"content":{"rendered":"<p>Helm is the Kubernetes package manager which has become an indispensable tool for managing and deploying the applications in the cloud-native ecosystem. Helm&#8217;s capacity to interface with repositories, which are collections of charts that provide pre-configured applications or services, is one of its core features. Helm repositories improve the process of administering the applications on Kubernetes clusters by allowing the users to easily discover, install, update, and remove charts.<\/p>\n<p>We will look at how to install, edit, and remove the Helm repositories, allowing us to take advantage of the large array of charts available in the Helm ecosystem. Understanding the repository management approaches will considerably improve our ability to work with Helm.<\/p>\n<p>Install Helm on Linux using the following command:<\/p>\n<p>Type the \u201cwget\u201d command to download and install Helm on your system.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span><span class=\"kw2\">wget<\/span> https:<span class=\"sy0\">\/\/<\/span>get.helm.sh<span class=\"sy0\">\/<\/span>helm-v3.9.3-linux-amd64.tar.gz<\/div><\/div>\n<p>Then, using the Linux tar program, unpack the Helm file:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span><span class=\"kw2\">tar<\/span> xvf helm-v3.9.3-linux-amd64.tar.gz<\/div><\/div>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">linux-amd64<span class=\"sy0\">\/<\/span><br \/>\n<br \/>\nlinux-amd64<span class=\"sy0\">\/<\/span>helm<br \/>\n<br \/>\nlinux-amd64<span class=\"sy0\">\/<\/span>LICENSE<br \/>\n<br \/>\nlinux-amd64<span class=\"sy0\">\/<\/span>README.md<\/div><\/div>\n<p>Transfer the \u201clinux-amd64\/helm\u201d file to \u201c\/usr\/local\/bin\u201d:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">mv<\/span> linux-amd64<span class=\"sy0\">\/<\/span>helm <span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>local<span class=\"sy0\">\/<\/span>bin<\/div><\/div>\n<p>Run the following command to delete the \u201clinux-amd64\u201d directory and free up some space:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span><span class=\"kw2\">rm<\/span> <span class=\"re5\">-rf<\/span> linux-amd64<\/div><\/div>\n<p>Finally, check the program version to ensure that we successfully installed Helm.<\/p>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">$ helm version<br \/>\n<br \/>\n$ helm version<br \/>\n<br \/>\nversion.BuildInfo<span class=\"br0\">&#123;<\/span>Version:<span class=\"st0\">&quot;v3.9.3&quot;<\/span>, GitCommit:<span class=\"st0\">&quot;414ff28d4029ae8c8b05d62aa06c7fe3dee2bc58&quot;<\/span>, GitTreeState:<span class=\"st0\">&quot;clean&quot;<\/span>, GoVersion:<span class=\"st0\">&quot;go1.17.13&quot;<\/span><span class=\"br0\">&#125;<\/span><\/div><\/div>\n<h2><strong>How to Add the Helm Repositories<\/strong><\/h2>\n<p>We must first add the Helm repositories to our Helm environment before using them. Helm allows us to add both the official Helm team repositories and custom repositories that are generated by individuals or organizations. Adding a repository entails supplying the repository&#8217;s URL and giving it a unique name. Let us see the following syntax:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">helm repo add <span class=\"sy0\">&lt;<\/span>repository-name<span class=\"sy0\">&gt;<\/span> <span class=\"sy0\">&lt;<\/span>repository-url<span class=\"sy0\">&gt;<\/span> <span class=\"sy0\">&lt;<\/span>repository-flages<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<ul>\n<li><strong>\u2018&lt;repository-name&gt;\u2019:<\/strong> This is a placeholder for the name that we want to give to the repository. It is a user-defined name and can be anything we choose. The repository can be located using it.<\/li>\n<li><strong>\u2018&lt;repository-url&gt;\u2019:<\/strong> This is the URL of the repository. It should point to the repository&#8217;s \u201cindex.yaml\u201d file which contains information about the accessible charts in the repository. The URL can be an HTTP\/HTTPS URL or a path to a local file.<\/li>\n<li><strong>\u2018&lt;repository-flags&gt; (optional)\u2019:<\/strong> This section allows us to add additional repository flags or settings. Flags affect the Helm repository&#8217;s behavior. Some commonly used flags are:<\/li>\n<\/ul>\n<ol>\n<li><strong>\u2018username and \u2013password\u2019:<\/strong> When the repository requires authentication, add the username and password with these flags.<\/li>\n<li><strong>\u2018ca-file\u2019:<\/strong> If the repository is secured with a custom certificate authority (CA), we can specify the CA file with this flag.<\/li>\n<li><strong>\u2018cert-file and key-file\u2019: <\/strong>If the repository requires client-side certificates for authentication, we can supply the certificate and key files with these flags.<\/li>\n<\/ol>\n<h2><strong>How to Update the Helm Repositories in Linux<\/strong><\/h2>\n<p>It is critical to keep the Helm repositories up-to-date in order to have access to the most recent versions of charts and their dependencies. Fortunately, Helm provides a simple way for updating the repositories and synchronizing them with the most recent available charts.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span>helm repo update<\/div><\/div>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">$ helm repo update<br \/>\n<br \/>\nHang tight <span class=\"kw1\">while<\/span> we grab the latest from your chart repositories...<\/div><\/div>\n<p>This tool retrieves the most up-to-date repository information for all repositories in our Helm environment, including modifications to charts and new additions. It is advised that we run this command on a regular basis to keep up with the Helm ecosystem&#8217;s evolution.<\/p>\n<p>If we need to update a specific repository, use the following command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">helm repo update <span class=\"sy0\">&lt;<\/span>repository-name<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p>For example, to update the stable repository, we should type the following:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span>helm repo update stable<\/div><\/div>\n<p>This command fetches the latest information specifically for the mentioned repository.<\/p>\n<h2><strong>How to Remove the Helm Repositories in Linux<\/strong><\/h2>\n<p>There may be times when we no longer require access to a specific repository. To reduce the clutter and potential confusion, delete the repository from our Helm environment in such circumstances.<\/p>\n<p>The following is the usual syntax to uninstall the Helm repositories:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">helm repo remove <span class=\"br0\">&#91;<\/span>REPO1 <span class=\"br0\">&#91;<\/span>REPO2 ...<span class=\"br0\">&#93;<\/span><span class=\"br0\">&#93;<\/span> <span class=\"br0\">&#91;<\/span>flags<span class=\"br0\">&#93;<\/span><\/div><\/div>\n<p>Enter this command to remove a Helm repository:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span>helm repo remove stable<\/div><\/div>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">$ helm repo remove stable<br \/>\n<br \/>\n<span class=\"st0\">&quot;stable&quot;<\/span> has been removed from your repositories<\/div><\/div>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>Helm repositories are indispensable for accessing and utilizing the vast chart ecosystem provided by the Helm community. Adding, updating, and removing repositories are essential skills for any developer who work with Helm. By following the steps that are outlined in this article, we can confidently manage the Helm repositories which enables us to leverage the power of Helm charts and simplify the deployment of applications in Kubernetes clusters.<\/p>","protected":false},"excerpt":{"rendered":"<p>Guide on how to install, edit, and remove the Helm repositories to leverage the power of Helm charts and simplify the deployment of applications in Kubernetes.<\/p>","protected":false},"author":111,"featured_media":22477,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1053],"tags":[],"class_list":["post-22472","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-best-of-linux"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/22472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/111"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=22472"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/22472\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/22477"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=22472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=22472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=22472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}