Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: update the helm usage #118

Merged
merged 1 commit into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions docs/usage/helm_usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Use helm in the devops-toolkit

## Prerequisite

Familiar with the [kubectl_usage](./kubectl_usage.md) first so we can have the correct k8s integration

## Helm document

Some document to help you start with helm

- <https://helm.sh/docs/>
- <https://github.com/tungbq/devops-basic/tree/main/topics/helm>

## Note

To use the existing container instead of creating one, use `docker exec` command instead of `docker run`

```bash
docker exec -it my_devops_toolkit /bin/bash
```

## Use case 1: Deploy an application with Helm

Mount the `.kube/config` file from the host to container (or other kubeconfig files you had)

```bash
docker run --rm --network host -it -v ~/.kube/config:/root/.kube/config devops-toolkit:latest
###############################################
# Now we are in the docker container terminal #
###############################################
# Command to check k8s node
kubectl get nodes
# Deploy with Helm
helm repo add bitnami https://charts.bitnami.com/bitnami
# Make sure we get the latest list of charts
helm repo update
helm install bitnami/mysql --generate-name
```

Sample Result

```bash
Update Complete. ⎈Happy Helming!⎈
root@docker-desktop:~# helm install bitnami/mysql --generate-name
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
NAME: mysql-1710654490
LAST DEPLOYED: Sun Mar 17 05:48:12 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: mysql
CHART VERSION: 9.23.0
APP VERSION: 8.0.36
```

## Troubleshooting

- For any issues, check [this reference](../troubleshooting/TROUBLESHOOTING.md)
2 changes: 1 addition & 1 deletion docs/usage/kubectl_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ docker run --rm --network host -it -v ~/.kube/config:/root/.kube/config devops-t
###############################################
# Now we are in the docker container terminal #
###############################################
# Command to check k8s node
kubectl get nodes

# Deploy application
kubectl apply -f https://k8s.io/examples/application/deployment.yaml
# View the pod
Expand Down