Welcome to the Basic Helm Charts Template repository! π This repo provides a clean, minimal starting point for creating and managing Helm charts for Kubernetes applications. π―
- π Pre-organized structure for efficient chart development.
- π οΈ Includes essential templates for ConfigMaps, Deployments, Services, and more.
- π§ Easy customization for a wide range of Kubernetes workloads.
- π Follows Helm best practices for readability and maintainability.
- Developers and DevOps teams setting up new Helm charts quickly π οΈ
- Learning Helm with a streamlined template π
- Building consistent and reusable deployment configurations π
Clone, customize, and deploy with confidence! π€
To use this repository template, simply fork the repo.
gh repo fork --fork-name <FORK_NAME> --org <ORG_NAME>
Update the repository settings:
gh repo edit --add-topic devops,reliability-engineering,axes \
--add-topic infrastructure-as-code,viking,mosher-labs \
--add-topic helm,helm-charts,kubernetes,k8s \
--delete-branch-on-merge --enable-discussions=false \
--enable-issues=false --enable-merge-commit=false \
--enable-projects=false --enable-rebase-merge=false \
--enable-wiki=false
Create a ruleset for the default branch.
- Ruleset Name: Default branch
- Enforcement status: Active
- Target Branches: Default
- β Restrict deletions
- β Require linear history
- β Require signed commits
- β Require a pull request before merging
- β Dismiss stale pull request approvals when new commits are pushed
- β Require conversation resolution before merging
- β Request pull request review from Copilot
- Allowed merge methods: "Squash"
- β Require status checks to pass
- β Require branches to be up to date before merging
- β Do not require status checks on creation
- Status checks that are required:
pre-commit/pre-commit
- β Block force pushes
- β Require code scanning results
Enable Dependabot.
- In Github UI, navigate to the repositories Settings > Code security
- Enable Dependabot security updates
- Enable Grouped security updates
- Enable Dependabot version updates
- Enable Dependabot on Actions runners
- CodeQL analysis > Set up > Default
- Enable Secret scanning
- Enable Push protection
Update the templated information:
-
Replace
basic-helm-charts-template
with your<FORK_NAME>
-
Run this command to update template information:
sed -e 's/basic-helm-charts-template/<FORK_NAME>/g' | \ find . -type f ! -path './.git/*'
-
Update the "Introduction" section
-
Update the "Usage" section
-
Update the "Contributing" section
scp -i ~/.ssh/ansible_key ansible@192.168.202.14:/etc/rancher/k3s/k3s.yaml ~/k3s.yaml
sed -i '' 's/127.0.0.1/192.168.202.14/g' ~/k3s.yaml
chmod 600 /Users/benniemosher/k3s.yaml
export KUBECONFIG=~/k3s.yaml
kubectl get nodes
kubectl get deployments --namespace default
kubectl get pods --namespace default
kubectl get services --namespace default
## More detailed queries
kubectl describe deployment hello-world -n default
kubectl describe pod <pod-name> -n default
Package the Helm chart if you want to create a .tgz file:
helm package hello-world
Use the helm upgrade --install command to deploy or upgrade the Helm chart in your Kubernetes cluster. This command will install the chart if it is not already installed or upgrade it if it is already installed.
helm upgrade --install hello-world \
./hello-world --namespace default
After running the Helm upgrade command, you can verify that the deployment was successful by checking the status of the release:
helm status hello-world --namespace default
You can also use kubectl commands to check the status of the pods, services, and other resources:
kubectl get all -n default
To delete the hello-world deployment:
kubectl delete deployment hello-world --namespace default
kubectl delete service hello-world --namespace default
To verify the deletion:
kubectl get deployments
kubectl get services
Upon first clone, install the pre-commit hooks.
pre-commit install
To run pre-commit hooks locally, without a git commit.
pre-commit run -a --all-files
To update pre-commit hooks, this ideally should be ran before a pull request is merged.
pre-commit autoupdate