Git Product home page Git Product logo

k8s-nats-streaming's Introduction

NATS Streaming Server on Kubernetes

This project contains a Docker image and a Helm chart to run NATS Streaming Server in the Kubernetes cluster. The NATS Streaming Server can run in fault tollerance mode

Requirements

  • Kubernetes v1.8.0 or later.
  • A NFS instance like Amazon EFS or Google Gluster.

Syntax

Build Helm chart

make helm

Helm chart options

Keys Default Description
image 'docker.io/canhnt/nats-streaming-server:v0.6.0' Docker image to deploy
imagePullPolicy 'IfNotPresent'
replicas 3 Number of nats-streaming replicas
storageSize 1Gi Storage size of the share volume between nats-streaming replicas
pv.serverUrl 'FAKED' URL of the NFS instance

k8s-nats-streaming's People

Contributors

canhnt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

k8s-nats-streaming's Issues

Running locally with Minikube

I am having trouble getting this running locally with Minikube, although I believe I've correctly configured NFS.

Just curious if anyone else has had any success running this on Minikube and if so, I'd love to see some details :)

Fault tolerance is not working properly

Hi ,

I am trying to deploy our service in fault tolerance mode but getting following error,

[1] 2018/10/29 05:35:03.204539 [INF] STREAM: Starting nats-streaming-server[test-cluster] version 0.11.0
[1] 2018/10/29 05:35:03.204672 [INF] STREAM: ServerID: P07uuMnXfUYvWv9o0yMZAl
[1] 2018/10/29 05:35:03.204676 [INF] STREAM: Go version: go1.11
[1] 2018/10/29 05:35:03.205646 [INF] Starting nats-server version 1.3.0
[1] 2018/10/29 05:35:03.205659 [INF] Git commit [not set]
[1] 2018/10/29 05:35:03.205858 [INF] Starting http monitor on 0.0.0.0:8222
[1] 2018/10/29 05:35:03.205908 [INF] Listening for client connections on 0.0.0.0:4222
[1] 2018/10/29 05:35:03.205916 [INF] Server is ready
[1] 2018/10/29 05:35:03.206096 [INF] Listening for route connections on 0.0.0.0:6222
[1] 2018/10/29 05:35:03.232439 [INF] STREAM: Starting in standby mode
[1] 2018/10/29 05:35:04.206542 [ERR] Error trying to connect to route: dial tcp 10.254.90.19:6222: i/o timeout
[1] 2018/10/29 05:35:04.500251 [INF] STREAM: Server is active
[1] 2018/10/29 05:35:04.500306 [INF] STREAM: Recovering the state..

helm chart is below,
spec:
hostname: {{ .Values.EventBrokerHostname }} # Optional, hostname of the exampleservice , fill in values.yaml
containers:
- name: eventbroker-internal-{{ .Values.CorePaasname }} # name of container1 eg: examplecontainer1
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" # container image to be filled from values.yaml
imagePullPolicy: "{{ .Values.imagePullPolicy }}" # can take values always,IfNotPresent
ports:
- containerPort: {{ .Values.port}}
args:
- -m=8222
- -st=FILE
- --dir=./nats-datastore
- -ft_group=ft
- --cluster=nats://0.0.0.0:6222
- --routes=nats://{{ template "eventbroker.name" . }}:6222

I read from this https://github.com/nats-io/nats-streaming-server#fault-tolerance there should be two servers & each should route with others.
But in the given helm chart only 6222 is given and not the 6223.Can you anyone suggest?

Also i tried to tested this below but when one active goes down ,standby is not coming up.

nats-streaming-server -store file -dir datastore -ft_group "ft" -cluster nats://localhost:6222 -routes nats://localhost:6223 -p 4222

nats-streaming-server -store file -dir datastore -ft_group "ft" -cluster nats://localhost:6223 -routes nats://localhost:6222 -p 4223

Regards,
Solomon Alexander.T

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.