HELM (The package manager for Kubernetes)
Helm is the best way to find, share and use software built for kubernetes
Installation Steps On Ubuntu
curl https://baltocdn.com/helm/signing.asc | sudo apt-key add -
sudo apt-get install apt-transport-https --yes
echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm
Verification
helm version
helm --help
Add Stable Repository
helm repo add stable https://charts.helm.sh/stable
curl https://baltocdn.com/helm/signing.asc | sudo apt-key add -
sudo apt-get install apt-transport-https --yes
echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm
Verification
helm version
helm --help
Add Stable Repository
helm repo add stable https://charts.helm.sh/stable
helm search repo stable
helm repo update
helm install prometheus stable/prometheus-operator
kubectl --namespace default get pods -l "release=prometheus"
to delete the repo (if you want):
helm uninstall prometheus stable/prometheus-operator
Create Charts (Packages)
1. Create a chart name it mychart
helm create mychart
1. Create a chart name it mychart
helm create mychart
2. Remove all the files under the template folder
cd mychart
cd mychart
ls
cd templates
rm -ifr *
3. Create a Yaml file under template folder
vi pod20-run.yaml
apiVersion: v1
kind: Pod
metadata:
name: pod20
spec:
containers:
- name: c1
image: nginx
4. Change to home directory
cd /home/vagrant
5. Install mychart
helm install mychart /home/vagrant/4-k8sservice/helmcharts/mychart
6. list the charts
helm list
7. List the pods
vi pod20-run.yaml
apiVersion: v1
kind: Pod
metadata:
name: pod20
spec:
containers:
- name: c1
image: nginx
4. Change to home directory
cd /home/vagrant
5. Install mychart
helm install mychart /home/vagrant/4-k8sservice/helmcharts/mychart
6. list the charts
helm list
7. List the pods
kubectl get pod
pod20 should be created.
pod20 should be created.
8. Uninstall mychart (if you want)
helm uninstall mychart #this will uninstall the release package
No comments:
Post a Comment