Update Deploy-Fleet-on-Kubernetes.md (#14155)

added clarification on running Helm commands in v2 vs v3

---------

Co-authored-by: Rachael Shaw <r@rachael.wtf>
This commit is contained in:
Dave Herder 2023-09-29 11:15:44 -07:00 committed by GitHub
parent fcc3c68165
commit 5696d4875b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,6 +93,8 @@ If you have not used Helm before, you must run the following to initialize your
helm init
```
> Note: The helm init command has been removed in Helm v3. It performed two primary functions. First, it installed Tiller which is no longer needed. Second, it set up directories and repositories where Helm configuration lived. This is now automated in Helm v3; if the directory is not present it will be created.
### Deploying Fleet with Helm
To configure preferences for Fleet for use in Helm, including secret names, MySQL and Redis hostnames, and TLS certificates, download the [values.yaml](https://raw.githubusercontent.com/fleetdm/fleet/main/charts/fleet/values.yaml) and change the settings to match your configuration.
@ -117,16 +119,24 @@ For the sake of this tutorial, we will again use Helm, this time to install MySQ
The MySQL that we will use for this tutorial is not replicated and it is not Highly Available. If you're deploying Fleet on a Kubernetes managed by a cloud provider (GCP, Azure, AWS, etc), I suggest using their MySQL product if possible as running HA MySQL in Kubernetes can be difficult. To make this tutorial cloud provider agnostic however, we will use a non-replicated instance of MySQL.
To install MySQL from Helm, run the following command. Note that there are some options that are specified. These options basically just enumerate that:
To install MySQL from Helm, run the following command. Note that there are some options that need to be defined:
- There should be a `fleet` database created
- The default user's username should be `fleet`
Helm v2
```sh
helm install \
--name fleet-database \
--set mysqlUser=fleet,mysqlDatabase=fleet \
stable/mysql
oci://registry-1.docker.io/bitnamicharts/mysql
```
Helm v3
```sh
helm install fleet-database \
--set mysqlUser=fleet,mysqlDatabase=fleet \
oci://registry-1.docker.io/bitnamicharts/mysql
```
This helm package will create a Kubernetes `Service` which exposes the MySQL server to the rest of the cluster on the following DNS address:
@ -156,11 +166,19 @@ kubectl create -f ./docs/Using-Fleet/configuration-files/kubernetes/fleet-migrat
#### Redis
Helm v2
```sh
helm install \
--name fleet-cache \
--set persistence.enabled=false \
stable/redis
oci://registry-1.docker.io/bitnamicharts/redis
```
Helm v3
```sh
helm install fleet-cache \
--set persistence.enabled=false \
oci://registry-1.docker.io/bitnamicharts/redis
```
This helm package will create a Kubernetes `Service` which exposes the Redis server to the rest of the cluster on the following DNS address:
@ -245,4 +263,4 @@ Once you have the public IP address for the load balancer, create an A record in
<meta name="title" value="Kubernetes">
<meta name="pageOrderInSection" value="800">
<meta name="description" value="A guide to deploy Fleet on Kubernetes.">
<meta name="navSection" value="Deployment guides">
<meta name="navSection" value="Deployment guides">