Skip to main content

NATS


설치

helm repo add nats https://nats-io.github.io/k8s/helm/charts
helm repo update nats \
&& helm search repo nats/nats -l | head -n 10
helm show values nats/nats \
--version 0.19.5 \
> nats-values.yaml
nats-values.yaml
fullnameOverride: ""

commonLabels: {}

nats:
resources:
requests:
cpu: 1
memory: 2Gi
limits:
cpu: 2
memory: 2Gi

jetstream:
enabled: true

memStorage:
enabled: false
size: 1Gi

fileStorage:
enabled: true
storageDirectory: /data
size: 10Gi
accessModes:
- ReadWriteOnce

affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/name: nats
app.kubernetes.io/instance: nats
topologyKey: kubernetes.io/hostname
weight: 100

statefulSetPodLabels: {}

cluster:
enabled: true
replicas: 3

natsbox:
enabled: false

auth:
enabled: true

basic:
users:
- user: <user>
password: <password>
- nkey: <nkey-user>
helm template nats nats/nats \
--version 0.19.5 \
-n event \
-f nats-values.yaml \
> nats.yaml
helm upgrade nats nats/ntas \
--install \
--version 0.19.5 \
-n event \
--history-max 3 \
-f nats-values.yaml

Test

kubectl run -i --rm --tty nats-box --image=natsio/nats-box --restart=Never