4. Create Helm with Docker - AnbuMani27/Kubernetes-with-Helm-Charts GitHub Wiki
Once the previous setup is completed, we will start integrate Our Web API Docker Image in HELM Chart for Deployment.
-
Kindly install the Helm extension in the VS Code.
-
Create a Main folder with Appropriate Name, eg. Helm "D:\Samples\Helm".
-
Create a folder named Chart inside Main Folder.
-
Open VS Code and navigate to the Chart folder created.
-
Create a File with File Name Chart.yaml. Its Case-Sensitive VERY IMPORTANT as Helm searches for the Chart.yaml. This file consist of charts details as name & version etc.
-
Copy the code to Chart.yaml from the gist Here
-
Create a File with File Name values.yaml, this file contains the value of the variables which is used in the templates of Web API. Replace the AnbuMani27 with your docker registry name.
-
Copy the code to values.yaml from the gist Here
-
Create a Folder with Name templates and also add sub-folders named kubehelmapi inside templates folder.
-
The folder structure in the VS Code should look like below.
-
Navigate to kubehelmapi folder and create a File with Name deployment.yaml, this files captures the container name and replica count of KubeHelmApi.
-
Copy the code from Gist here to deployment.yaml Here
-
In the kubehelmapi folder and create a File with Name service.yaml. This file contains the details to access the pods of WebAPI that is created by deployment.yaml. Service will get you the common IP for the replicaset that is created, which consists of multiple pods.
-
Copy the code from the Gist here to service.yaml Here.
-
Add file named ingress.yaml in template folder, this file has the ingress that acts as proxy for the WebAPI, here you will give details about how you can navigate to KubeHelmApi (/ navigates to Deployed Project API ) based on Url.
-
Copy the code from the Gist Here to ingress.yaml file of template folder. Your folder structure should look like below.
-
Save all the files.