oktopus/deploy/kubernetes
2024-04-21 01:24:28 +00:00
..
adapter.yaml k8s deployment files 2024-04-07 15:26:04 +00:00
controller.yaml ingress controller for frontend and rest api 2024-04-21 01:24:28 +00:00
frontend.yaml ingress controller for frontend and rest api 2024-04-21 01:24:28 +00:00
ingress.yaml ingress controller for frontend and rest api 2024-04-21 01:24:28 +00:00
mongodb.yaml Fix MQTT Workflow, mongodb operator user permissions 2024-04-12 03:47:00 +00:00
mqtt-adapter.yaml k8s deployment files 2024-04-07 15:26:04 +00:00
mqtt.yaml dev-k8s 2024-04-20 18:56:55 +00:00
README.md Kubernetes Deployment - WIP 2024-04-16 22:56:47 -03:00
socketio.yaml frontend and socketio 2024-04-12 02:05:45 +00:00
ws-adapter.yaml Missing Files for Deployment 2024-04-10 17:03:59 +00:00
ws.yaml Kubernetes Deployment - WIP 2024-04-16 22:56:47 -03:00

Oktopus Kubernetes

Requirements

Kubernetes 1.28+

Standalone Installation

Single Node:

  • 8 vCPUs
  • 8 GB RAM

Installation

Download Files

git clone https://github.com/OktopUSP/oktopus
export DEPLOYMENT_PATH=oktopus/deploy/kubernetes

MongoBD

# Mongo DB Operator at mongodb namespace
helm repo add mongodb https://mongodb.github.io/helm-charts

helm install community-operator mongodb/community-operator --namespace mongodb --create-namespace

# Mongo DB ReplicaSet
export DEPLOYMENT_PATH=oktopus/deploy/kubernetes

kubectl apply -f $DEPLOYMENT_PATH/mongodb.yaml -n mongodb

# Check Installation
kubectl get pods -n mongodb

NATS Server

# Download the NATS charts
helm repo add nats https://nats-io.github.io/k8s/helm/charts/

# Install NATS with Jetstream Enabled
helm install nats nats/nats --set config.jetstream.enabled=true

Oktopus

Node Ports

For this deployment, we are not using a load balancer and kubernetes is deployed on-premises so we are using Nodeports to insource the client traffic into cluster. below the ports set on deployment files:

  1. MQTT broker service (mqtt-svc): 30000
  2. Frontend (frontend-svc): 30001
  3. SocketIO: (socketio-svc): 30002
  4. Controller (controller-svc): 30003
  5. WebSocket (ws-svc): 30005

Before deploying the files, edit the frontend.yaml file to set the correct enviroment variables:

env:
    - name: NEXT_PUBLIC_REST_ENDPOINT
        value: "<FRONTEND_IP>:30003"
    - name: NEXT_PUBLIC_WS_ENDPOINT
        value: "<FRONTEND_IP>:30005"
kubectl apply -f $DEPLOYMENT_PATH/mqtt.yaml
kubectl apply -f $DEPLOYMENT_PATH/mqtt-adapter.yaml
kubectl apply -f $DEPLOYMENT_PATH/adapter.yaml
kubectl apply -f $DEPLOYMENT_PATH/controller.yaml
kubectl apply -f $DEPLOYMENT_PATH/socketio.yaml
kubectl apply -f $DEPLOYMENT_PATH/frontend.yaml
kubectl apply -f $DEPLOYMENT_PATH/ws.yaml
kubectl apply -f $DEPLOYMENT_PATH/ws-adapter.yaml

Checking cluster status:


kubectl get pods
kubectl get svc