1
+ name : nats-server.conf
2
+ description : |
3
+ Operator Managed NATS Server for Kubernetes
4
+
5
+ This will guide you through a series of question to create a NATS Cluster
6
+ configuration managed by a NATS Operator using the nats Helm Chart.
7
+
8
+ To use this an Operator should have been created using the "nats auth" command.
9
+
10
+ For more information about Decentralized Authentication please read:
11
+
12
+ https://docs.nats.io/running-a-nats-service/configuration/securing_nats/auth_intro/jwt
13
+
14
+ For more information about the Helm chart please read:
15
+
16
+ https://github.com/nats-io/k8s/tree/main/helm/charts/nats
17
+
18
+ Deploy the resulting Cluster using helm:
19
+
20
+ helm repo add nats https://nats-io.github.io/k8s/helm/charts/
21
+ helm upgrade --install nats nats/nats -f values.yaml
22
+
23
+ To access the cluster you can use kubectl:
24
+
25
+ kubectl port-forward service/nats 4222
26
+
27
+ Once set up you can create credentials and push your accounts.
28
+
29
+ properties :
30
+ - name : replicas
31
+ description : How many server pods to start
32
+ type : integer
33
+ default : " 3"
34
+
35
+ - name : streams
36
+ description : Enables JetStream in the cluster
37
+ type : bool
38
+ default : " true"
39
+
40
+ - name : jetstream
41
+ description : |
42
+ JetStream configuration
43
+
44
+ We will now configure the NATS JetStream persistence layer. Setting the limits
45
+ to -1 means a dynamic value will be chosen by the server at start. We strongly
46
+ suggest setting specific limits.
47
+
48
+ See https://docs.nats.io/nats-concepts/jetstream for more information
49
+ conditional : " input.streams == true"
50
+ properties :
51
+ - name : storage
52
+ description : The maximum amount of PVC resources to allocate
53
+ help : Valid values look like '10Gi'
54
+ default : " 10Gi"
55
+
56
+ - name : resolver
57
+ description : |
58
+ NATS Resolver Configuration
59
+
60
+ We will now configure where the NATS Server will store account JWT files.
61
+ JWT files are pushed to the server using 'nats auth account push' and
62
+ describe the full configuration for each account.
63
+
64
+ Every server in a cluster needs a resolver configuration.
65
+ properties :
66
+ - name : allow_delete
67
+ description : Should the server allow accounts to be deleted
68
+ default : " true"
69
+ type : bool
70
+ - name : limit
71
+ description : The maximum amount of accounts to allow
72
+ default : " 1000"
73
+ type : integer
0 commit comments