In this lab, you will become familiar with Helm, set up a local development environment, and generate manifests for your application.
6 Points:
-
Learn About Helm:
- Begin by exploring the architecture and concepts of Helm:
-
Install Helm:
- Install Helm using the instructions provided:
-
Create Your Own Helm Chart:
- Generate a Helm chart for your application.
- Inside the
k8s
folder, create a Helm chart template by using the commandhelm create your-app
. - Replace the default repository and tag inside the
values.yaml
file with your repository name. - Modify the
containerPort
setting in thedeployment.yml
file. - If you encounter issues with
livenessProbe
andreadinessProbe
, you can comment them out.
- Inside the
For troubleshooting, you can use the
minikube dashboard
command. - Generate a Helm chart for your application.
-
Install Your Helm Chart:
- Install your custom Helm chart and ensure that all services are healthy. Verify this by checking the
Workloads
page in the Minikube dashboard.
- Install your custom Helm chart and ensure that all services are healthy. Verify this by checking the
-
Access Your Application:
- Confirm that your application is accessible by running the
minikube service your_service_name
command.
- Confirm that your application is accessible by running the
-
Create a HELM.md File:
- Construct a
HELM.md
file and provide the output of thekubectl get pods,svc
command within it.
- Construct a
4 Points:
-
Learn About Chart Hooks:
- Familiarize yourself with Helm Chart Hooks.
-
Implement Helm Chart Hooks:
- Develop pre-install and post-install pods within your Helm chart, without adding any complex logic (e.g., use "sleep 20"). You can refer to Example 1 in the guide.
-
Troubleshoot Hooks:
- Execute the following commands to troubleshoot your hooks:
helm lint <your_chart_name>
helm install --dry-run helm-hooks <your_chart_name>
kubectl get po
- Execute the following commands to troubleshoot your hooks:
-
Provide Output:
- Execute the following commands and include their output in your report:
kubectl get po
kubectl describe po <preinstall_hook_name>
kubectl describe po <postinstall_hook_name>
- Execute the following commands and include their output in your report:
-
Hook Delete Policy:
- Implement a hook delete policy to remove the hook once it has executed successfully.
List of Requirements:
- Helm Chart with Hooks implemented, including the hook delete policy.
- Output of the
kubectl get pods,svc
command inHELM.md
. - Output of all commands from the step 4 of Task 2 in
HELM.md
.
To Earn 2.5 Additional Points:
-
Helm Chart for Extra App:
- Prepare a Helm chart for an additional application.
-
Helm Library Charts:
- Get acquainted with Helm Library Charts.
-
Create a Library Chart:
- Develop a simple library chart that includes a "labels" template. You can follow the steps outlined in the Using Library Charts guide. Use this library chart for both of your applications.
- Ensure your documentation is clear and well-structured.
- Include all the necessary components.
- Follow appropriate file and folder naming conventions.
- Create and participate in PRs for the peer review process.
- Create pull requests (PRs) as needed: from your fork to the main branch of this repository, and from your fork's branch to your fork's master branch.
Note: Detailed documentation is crucial to ensure that your Helm deployment and hooks function as expected. Engage with the bonus tasks to further enhance your understanding and application deployment skills.