The router for mystack.
This is the mystack router component, it will discover new services of apps deployed by mystack on Kubernetes cluster and creates routes on Nginx for your specific domain. The routes are filtered by namespace (one for each user) and service.
- Go 1.7
- Docker
make cross-build-linux-amd64
This router must run inside Kubernetes cluster. So you need to create a docker image, push it to Dockerhub and run a service using this image. Here is an example of how to do it.
On project root, run (mind the dot):
docker build -t dockerhub-user/mystack-router:v1 .
docker push dockerhub-user/mystack-router:v1
kubectl create -f ./manifests
If you have the domain yourdomain.com
registered, you can point *.yourdomain.com
to your mystack-router loadbalancer external-ip and access your service with:
curl -v {{appname}}.{{user}}.yourdomain.com
Given that you've pointed *.yourdomain.com
to the router's LB address, access a service with:
example:
app: testapp
user: test-user
curl testapp.test-user.yourdomain.com