mystack-router

command module
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

README

mystack-router

Build Status

The router for mystack.

About

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.

Dependencies

  • Go 1.7
  • Docker

Building

Build a linux binary
  make cross-build-linux-amd64

Running

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.

Build a docker image

On project root, run (mind the dot):

  docker build -t dockerhub-user/mystack-router:v1 .
Push it to Dockerhub
  docker push dockerhub-user/mystack-router:v1
Create a yaml file for the router
kubectl create -f ./manifests
Configure your domain

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
Access your services

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL