Deploy the Helm Chart
The chart that we have created above and we have also seen the contents of values.yaml and it was shown that when this chart will be deployed it will create deployment and service for nginx of type ClusterIP because in the image option it is mentioned nginx, we can change the image name from there as per our requirement but for tutorial we will leave it as nginx.
Let’s proceed further with the deployment and execute the below command for deploying the helm chart in which we will set the name of helm chart and we will set the service type from ClusterIP to LoadBalancer because we will expose the service from outside of the cluster along with this we will set the replicas to 1 which means that we only want 1 single pod for our deployment.
helm install <name-for-chart> mychart/ --set service.type=LoadBalancer --set replicas=1
Now what this command will do, It will create deployment, service with type LoadBalancer and 1 replica set. We can have a look on it by executing
kubectl get all
Now it will show us the pods, deployments, service all together
Now we can use the LoadBalancer endpoint and hit it in the browser it will show us welcome page to nginx