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
Clone your own Repository –
Create new custome helm chart by using
$ helm create helmproject3
Here you can see helm chart created successfully
Create Dockerfile for your application .. I am creating for tomcat application..
Edite Chart.yaml , deployment.yaml, service.yaml, values.yaml file as per your project requirement.
Chart.yaml
#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
You can Build Your docker image.. navigate your dockerfile dir and run command
$ docker build -t dockerhub_repository/tomat:9.0.20 .
Push docker image to dockerhub
$ doker login $ docker push dockerhub_repository/tomcat:9.0.20
Edite service.yaml file
navigate project dir and run
$ helm repo index .
To check any errors run command
$ helm lint
$ 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
after commited successfully then try to install the chart
first create your own namespace
$ kubectl create ns helmproject3
$ helm install helmrelease2 helmproject3 -n helmproject3
$ helm list $ helm list -A
$ kubectl get pod $ kubectl get pod -A $ kubectl get svc $ kubectl get svc -A
$ minikube service helmrelease2-helmproject3 $ minikube service helmrelease2-helmproject3 -n helmproject3 --url
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
- AnchorSetup using Docker-Compose - October 18, 2024
- Devops assignment - October 17, 2024
- Deployment of vault HA using MySQL - September 18, 2024