Skip to content

mauscoelho/kubernetes-socket-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

kubernetes-socket-node

Create a redis Pod on kubernetes

kubectl create -f pods/redis.yaml

Setup host and port on app/server.js

const redisHost = "host";
const redisPort = "port";

Build your own image

docker build -t dockerid/name:v1 . 

Run your image on kubernetes

kubectl run socket-node --image=dockerid/name:v1 --port=8080

Expose your deployment

kubectl expose deployment socket-node --type="LoadBalancer"

Get you IP

kubectl get services

Send a socket with name msg and all sockets listening msg will receive

About

a simple example with kubernetes socket.io and nodejs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published