You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailchat/docker/simple/k8s
moonrailgun 1856be3539 chore: add k8s ingress router(traefik) and health check
health check help us if pod not ready, dont add into load balance list
2 years ago
..
images chore: add k8s ingress router(traefik) and health check 2 years ago
README.md chore: add k8s ingress router(traefik) and health check 2 years ago
ingress.yml chore: add k8s ingress router(traefik) and health check 2 years ago
minio.yml chore: add simple k8s config 2 years ago
mongo.yml chore: add simple k8s config 2 years ago
namespace.yml chore: add simple k8s config 2 years ago
pv.yml chore: add simple k8s config 2 years ago
redis.yml chore: add simple k8s config 2 years ago
tailchat.yml chore: add k8s ingress router(traefik) and health check 2 years ago

README.md

Its doc will tell you how to deploy Tailchat in kubeneters.

One Command

kubectl apply -f namespace.yml -f pv.yml -f mongo.yml -f minio.yml -f redis.yml -f tailchat.yml

Delete

if you wanna delete all resource, just delete namespace.

kubectl delete -f namespace.yml

Setup one by one

Create Namespace

kubectl apply -f namespace.yml

Create Persistent Volume

kubectl apply -f pv.yml

Create Mongodb

kubectl apply -f mongo.yml

Create Minio

kubectl apply -f minio.yml

Create Redis

kubectl apply -f redis.yml

Create Tailchat

kubectl apply -f tailchat.yml

Check tailchat-service work

get services ClusterIP

kubectl get svc -n tailchat

create test container in kubernetes

kubectl run -it --rm test-pod --image=busybox --restart=Never

request health and checkout nodeID, send multi times.

wget -q -O - http://<tailchat-cluster-ip>:11000/health

Router and Load Balance

For example, we use traefik.

Install Traefik provider

helm repo add traefik https://helm.traefik.io/traefik
helm install traefik traefik/traefik -n tailchat

Apply Ingress Config

kubectl apply -f ingress.yml

Check Status

kubectl get services -n tailchat

If every is ok, its should be like this:

Set DNS record

sudo vim /etc/hosts

append this record:

127.0.0.1 tailchat.internal.com

Now you can open browser and view http://tailchat.internal.com to open tailchat in k8s.