How to Deploy application in k8s using Helm
What We need to done before starting project:
- Ubuntu Operating system
- 8GB RAM
- 256GB SSD
- Install minikube on machine
- Create project repository on GitHub
- Install helm on machine [ link click here]
- Clone Github Repository
Starting Project;
Create custom repository on GitHub
![How to Deploy application in k8s using Helm](https://devopslover.com/wp-content/uploads/2024/02/image-4-1024x527.png)
Clone your own Repository –
![](https://devopslover.com/wp-content/uploads/2024/02/image-5-1024x527.png)
Create new custome helm chart by using
$ helm create helmproject3
![How to Deploy application in k8s using Helm](https://devopslover.com/wp-content/uploads/2024/02/image-6-1024x304.png)
Here you can see helm chart created successfully
![How to Deploy application in k8s using Helm](https://devopslover.com/wp-content/uploads/2024/02/image-7-1024x545.png)
Create Dockerfile for your application .. I am creating for tomcat application..
![](https://devopslover.com/wp-content/uploads/2024/02/image-8-1024x545.png)
Edite Chart.yaml , deployment.yaml, service.yaml, values.yaml file as per your project requirement.
Chart.yaml
![](https://devopslover.com/wp-content/uploads/2024/02/image-9-1024x545.png)
#values.yaml image: repository: kishordhangar/tomcat pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "9.0.20" service: type: NodePort port: 8029 targetport: 8080
![](https://devopslover.com/wp-content/uploads/2024/02/image-10-1024x576.png)
You can Build Your docker image.. navigate your dockerfile dir and run command
$ docker build -t dockerhub_repository/tomat:9.0.20 .
![](https://devopslover.com/wp-content/uploads/2024/02/image-11-1024x449.png)
Push docker image to dockerhub
$ doker login $ docker push dockerhub_repository/tomcat:9.0.20
![](https://devopslover.com/wp-content/uploads/2024/02/image-12-1024x449.png)
Edite service.yaml file
![](https://devopslover.com/wp-content/uploads/2024/02/image-13-1024x449.png)
navigate project dir and run
$ helm repo index .
![](https://devopslover.com/wp-content/uploads/2024/02/image-14-1024x210.png)
To check any errors run command
$ helm lint
![](https://devopslover.com/wp-content/uploads/2024/02/image-15-1024x430.png)
$ helm lint
==> Linting .
[INFO] Chart.yaml: icon is recommended
1 chart(s) linted, 0 chart(s) failed
that means everything are correct
Push edited files to your github repository
![](https://devopslover.com/wp-content/uploads/2024/02/image-16-1024x576.png)
after commited successfully then try to install the chart
first create your own namespace
$ kubectl create ns helmproject3
![](https://devopslover.com/wp-content/uploads/2024/02/image-17-1024x127.png)
$ helm install helmrelease2 helmproject3 -n helmproject3
![](https://devopslover.com/wp-content/uploads/2024/02/image-18-1024x408.png)
$ helm list $ helm list -A
![](https://devopslover.com/wp-content/uploads/2024/02/image-19-1024x332.png)
$ kubectl get pod $ kubectl get pod -A $ kubectl get svc $ kubectl get svc -A
![](https://devopslover.com/wp-content/uploads/2024/02/image-20-1024x576.png)
$ minikube service helmrelease2-helmproject3 $ minikube service helmrelease2-helmproject3 -n helmproject3 --url
![](https://devopslover.com/wp-content/uploads/2024/02/image-21-1024x576.png)
![](https://devopslover.com/wp-content/uploads/2024/02/image-22-1024x576.png)
![](https://devopslover.com/wp-content/uploads/2024/02/image-23-1024x576.png)
Tag –
How to Deploy application in k8s using Helm,How to Deploy application in k8s using Helm,How to Deploy application in k8s using Helm,How to Deploy application in k8s using Helm
- Deployment of Spring Boot Application on Kubernetes Using Helm - July 19, 2024
- Robot Framework for Selenium Automation - July 14, 2024
- Pytest Framework (Selenium Automation) - July 14, 2024