Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours scrolling social media and waste money on things we forget, but won’t spend 30 minutes a day earning certifications that can change our lives.
Master in DevOps, SRE, DevSecOps & MLOps by DevOpsSchool!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Openshift: How to add Helm Repository in Openshift

Adding a Helm repository in OpenShift is a common step to manage and deploy Helm charts in your OpenShift cluster. OpenShift supports Helm CLI out of the box, and also provides an Operator (Helm Chart Repository CRD) to centrally manage chart repositories visible in the OpenShift Web Console’s Developer Catalog.

Below, you’ll find two ways:

  • A. Using the Helm CLI (User-level, CLI only)
  • B. Adding a Helm Chart Repository for the OpenShift Web Console (Admin-level, visible in Catalog)

A. Add a Helm Repository via CLI (User-level, CLI only)

This lets you use any public Helm repo (e.g., Bitnami, Jetstack) in your terminal, similar to Kubernetes.

Step 1. Install the Helm CLI

Step 2. Add a Repository

helm repo add bitnami https://charts.bitnami.com/bitnamiCode language: JavaScript (javascript)
  • Replace bitnami and URL with your desired repo.

Step 3. Update Repositories

helm repo update

Step 4. List Charts

helm search repo bitnami

Step 5. Install a Chart into OpenShift

Make sure you’re logged into your OpenShift cluster:

oc login ... # login if needed
helm install my-mongodb bitnami/mongodb --namespace=my-namespaceCode language: PHP (php)

That’s it!
You can now install, upgrade, or uninstall Helm charts using the CLI.


B. Add Helm Chart Repository for the OpenShift Web Console Catalog (Admin-level)

This is required if you want all users to browse and deploy charts from a repo using the OpenShift Web Console (Developer Catalog).

Step 1. Log in as a cluster-admin

oc login -u kubeadmin -p <password> https://api.<cluster-domain>:6443Code language: HTML, XML (xml)

Step 2. Create a Project (Optional)

oc new-project devopsschool-devCode language: JavaScript (javascript)

Step 3. Apply the ProjectHelmChartRepository YAML

Create a file called bitnami-helm-repo.yaml:

apiVersion: helm.openshift.io/v1beta1
kind: ProjectHelmChartRepository
metadata:
  name: bitnami
  namespace: devopsschool-dev
spec:
  name: bitnami
  description: Bitnami Helm chart repository
  connectionConfig:
    url: https://charts.bitnami.com/bitnami
Code language: JavaScript (javascript)

You can use any name/namespace. The url: should be your chart repo URL.

Step 4. Apply the YAML

oc apply -f bitnami-helm-repo.yamlCode language: CSS (css)

Step 5. Check in the Web Console

  • Go to Developer+AddHelm Chart
  • You should see the Bitnami charts available for install!

Troubleshooting & Tips

  • You need the Helm Operator installed by default in OpenShift 4.x+.
  • To add a repo cluster-wide (all namespaces), use a HelmChartRepository resource, not ProjectHelmChartRepository.
  • For private repositories, add authentication fields under connectionConfig.

Summary Table

MethodScopeUse Case
Helm CLIPer-user (CLI only)Quick install, dev/test, CI/CD
ProjectHelmChartRepositoryNamespace (Web UI & CLI)Org-wide, dev teams, UI Catalog
HelmChartRepositoryCluster-wideAll projects, company-wide

References


Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x