🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

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

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

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


Get Started Now!

Helm Lab – 5: Creating Local & Remote Helm Repository

Creating Local helm Repository

# test deploying Chart Museum from the custom repository
# offical repository for chartmuseum is
# https://artifacthub.io/packages/helm/chartmuseum/chartmuseum
helm repo add chartmuseum https://chartmuseum.github.io/charts
helm install chartmuseum chartmuseum/chartmuseum --dry-run --debug
# deploy Chart Museum
helm install chartmuseum chartmuseum/chartmuseum --set env.open.DISABLE_API=false
# Ref - helm install my-chartmuseum chartmuseum/chartmuseum --version 3.10.1
# view release
helm list
# view Chart Museum pod ans its labels
kubectl get pods --show-labels
# grab the Chart Museum pod name using the label retrieved from the previous command
# Powershell
$POD_NAME=$(kubectl get pods -l "app.kubernetes.io/name=chartmuseum" -o jsonpath="{.items[0].metadata.name}")
#Linux
POD_NAME=$(kubectl get pods -l "app.kubernetes.io/name=chartmuseum" -o jsonpath="{.items[0].metadata.name}")
echo $POD_NAME
# set up port forwarding
# this would be accessible only by 127.0.0.1
kubectl port-forward $POD_NAME 8080:8080 --namespace default
# this would be accessible by NodeIP of the host where u ran a command
kubectl port-forward --address 0.0.0.0 $POD_NAME 8080:8080 --namespace default
# confirm Chart Museum is up and running
# http://127.0.0.1:8080
# view Helm help to get location of Helm Configuration Path
helm --help
# navigate to folder containing repository names and URLs, e.g. -
# C:\Users\apruski\AppData\Roaming\helm\
# add Chart Museum as a Helm repository
helm repo add chartmuseum http://127.0.0.1:8080
# list repositories
helm repo list
# view updated repositories.yaml file
# C:\Users\apruski\AppData\Roaming\helm\
# naviage to packaged Chart
cd C:\Charts
# confirm curl
curl --help
# if using powershell v5.1 you'll need to remove
# the alias that maps curl to Invoke-WebRequest
Remove-Item alias:\curl
# push chart to Chart Museum
# a place where u have ourchart-0.1.0.tgz
cd /home/ubuntu/charts
curl --data-binary "@ourchart-0.1.0.tgz" http://localhost:8080/api/charts
# search for the chart
helm search repo chartmuseum/ourchart
# view helm help again to get Helm Cache Path
helm --help
# view cached chartmuseum-index.yaml file for repository
# C:\Users\apruski\AppData\Local\Temp\helm\repository
# update Helm repositories
helm repo update
# view updated chartmuseum-index.yaml file for repository
# C:\Users\apruski\AppData\Local\Temp\helm\repository
# search Chart Museum for our chart
helm search repo chartmuseum/ourchart
# we can also see the chart in the Helm section of
# of the Kubernetes extension for vs code
# deploy the chart from Chart Museum
helm install ourchart chartmuseum/ourchart
# view release
helm list
##################################################
# go to Github and create a repository
##################################################
# clone repository locally
git clone https://github.com/dbafromthecold/DemoHelmRepo.git
# navigate to repo
cd C:\git\DemoHelmRepo
# copy packaged chart into repo
cp C:\charts\ourchart-0.1.0.tgz .
# index repo
helm repo index .
# view index.yaml
cat index.yaml
# push chart to Github
git config user.name "Rajesh Kumar"
git congig user.email "devops@rajeshkumar.xyz"
git add .
git commit -m "added ourchart to repo"
git push
##################################################
# get URL from index.yaml file in GitHub repository
##################################################
# add Githb repo as a Helm repository
helm repo add dbafromthecold https://raw.githubusercontent.com/dbafromthecold/DemoHelmRepo/master
helm repo add rajesh https://raw.githubusercontent.com/devopsschool-demo-temporary/demp4helm/main
# navigate to folder containing repository names and URLs
# C:\Users\apruski\AppData\Roaming\helm\
helm env
cd /root/.config/helm
cd /root/.cache/helm
more repositories.yaml
cd repository/
more rajesh-index.yaml
# view cached index.yaml file for repository
# C:\Users\apruski\AppData\Local\Temp\helm\repository
# search new Helm repository
helm search repo dbafromthecold/ourchart
# we can also see the chart in the Helm section of
# of the Kubernetes extension for vs code
# deploy chart from repository
helm install ourchart dbafromthecold/ourchart
# confirm deployment
helm list
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