-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Add documentation for kubernetes/helm #2743
Open
jlpedrosa
wants to merge
3
commits into
Koenkk:master
Choose a base branch
from
jlpedrosa:kubernetes_installation_docs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
next: ../configuration/ | ||
--- | ||
# Kubernetes | ||
These instructions explain how to run Zigbee2MQTT on k8s clusters through the use of the helm chart. | ||
|
||
# Values - Configuration | ||
Regardless of the method of installation chosen helm cli, flux/argo CD, first review the values.yaml file and choose the | ||
configuration required for you. | ||
The Zigbee2MQTT config section in the values.yaml is a 1:1 mapping of the usual config file, it simply is created on a configmap | ||
during the helm release creation. If you don't provide any additional values, sensible defaults are used in the deployment. | ||
|
||
If you are planning to use an usb adapter directly plugged into a node of the cluster, most likely you need to | ||
specify a `.values.statefulset.nodeSelector` so the pods are scheduled in the right node. | ||
|
||
By default, storage is not enabled, which is great for testing. | ||
If you just want to use dynamic volume provisioning, just configure the `statefulset.storage.storageClassName`. | ||
Persisting the volumes across installations, or you want to reuse existing data, you can leverage the options | ||
in `statefulset.storage` either providing a `volumeName` or selectors for volumes. Those fields get injected | ||
into the statefulSet persistentVolumeClaim which can link to existing volumes. | ||
|
||
## helm | ||
To install the chart manually using helm, first you need to add your the helm repository to your local helm installation: | ||
```bash | ||
helm repo add zigbee2mqtt https://charts.zigbee2mqtt.io/index | ||
``` | ||
|
||
Load the charts from the repository: | ||
```bash | ||
helm repo update | ||
``` | ||
|
||
Install the helm chart using the values of your choice (`myvalues.yaml` in the snipet below): | ||
```bash | ||
helm install -f myvalues.yaml zigbee2mqtt zigbee2mqtt/zigbee2mqtt | ||
``` | ||
|
||
## flux | ||
|
||
If you are using a gitops approach to manage your cluster, you can use the flux CRDs to create and manage the releases. | ||
|
||
The first step is to add to your repository the helm repository of zigbee2mqtt: | ||
```yaml | ||
apiVersion: source.toolkit.fluxcd.io/v1beta2 | ||
kind: HelmRepository | ||
metadata: | ||
name: zigbee2mqtt | ||
namespace: flux-system | ||
spec: | ||
interval: 10m | ||
url: https://charts.zigbee2mqtt.io/index | ||
|
||
``` | ||
|
||
Then create a Helm release: | ||
```yaml | ||
apiVersion: helm.toolkit.fluxcd.io/v2beta2 | ||
kind: HelmRelease | ||
metadata: | ||
name: zigbee2mqtt | ||
namespace: flux-system | ||
spec: | ||
interval: 5m | ||
targetNamespace: zigbee2mqtt | ||
chart: | ||
spec: | ||
chart: zigbee2mqtt | ||
version: '1.37.1' | ||
sourceRef: | ||
kind: HelmRepository | ||
name: zigbee2mqtt | ||
namespace: flux-system | ||
interval: 10m | ||
values: | ||
... your settings | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be
helm repo add zigbee2mqtt https://charts.zigbee2mqtt.io/
(lose the trailing index)