1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-05-02 22:17:10 +08:00

74 lines
1.6 KiB
Markdown
Raw Normal View History

# Deploy Mainflux on Kubernetes - WIP
Scripts to deploy Mainflux on Kubernetes (https://kubernetes.io). Work in progress. Not ready for deployment.
## Steps
2018-05-10 23:53:25 +02:00
### 1. Setup NATS
- To setup NATS cluster on k8s we recommend using [NATS operator](https://github.com/nats-io/nats-operator). NATS cluster should be deployed on namespace `nats-io` under the name `nats-cluster`.
### 2. Setup gRPC services Istio sidecar
- To load balance gRPC services we recommend using [Istio](https://istio.io/docs/setup/kubernetes/download-release/) sidecar. In order to use automatic inject you should run following command:
2018-05-10 23:53:25 +02:00
```
kubectl create -f k8s/mainflux/namespace.yml
```
2018-05-10 23:53:25 +02:00
### 2. Setup Users service
2018-05-10 23:53:25 +02:00
- Deploy PostgreSQL service for Users service to use:
2018-05-10 23:53:25 +02:00
```
kubectl create -f k8s/mainflux/users-postgres.yml
```
2018-05-10 23:53:25 +02:00
- Deploy Users service:
2018-05-10 23:53:25 +02:00
```
kubectl create -f k8s/mainflux/users.yml
```
### 3. Setup Things service
- Deploy PostgreSQL service for Things service to use:
2018-05-10 23:53:25 +02:00
```
kubectl create -f k8s/mainflux/things-postgres.yml
```
- Deploy Things service:
```
kubectl create -f k8s/mainflux/things.yml
2018-05-10 23:53:25 +02:00
```
### 4. Setup Normalizer service
2018-05-10 23:53:25 +02:00
- Deploy Normalizer service:
```
2018-05-10 23:53:25 +02:00
kubectl create -f k8s/mainflux/normalizer.yml
```
### 5. Setup adapter services
2018-05-10 23:53:25 +02:00
- Deploy adapter service:
2018-05-10 23:53:25 +02:00
```
kubectl create -f k8s/mainflux/tcp-services.yml
2018-05-10 23:53:25 +02:00
kubectl create -f k8s/mainflux/<adapter_service_name>.yml
```
2018-05-10 23:53:25 +02:00
### 6. Setup Dashflux
2018-05-10 23:53:25 +02:00
- Deploy Dashflux service:
2018-05-10 23:53:25 +02:00
```
kubectl create -f k8s/mainflux/dashflux.yml
```
### 7. Configure Internet Access
Configure NAT on your Firewall to forward ports 80 (HTTP) and 443 (HTTPS) to nginx ingress service