Compare commits
1 Commits
0d120588dc
...
8fa0b941c0
| Author | SHA1 | Date | |
|---|---|---|---|
| 8fa0b941c0 |
28
README.md
28
README.md
@@ -12,8 +12,30 @@ tier N1 VM. That extra hop doesn't matter.
|
|||||||
## Config
|
## Config
|
||||||
|
|
||||||
Configure nginx to do what you want, test it. Use any Node IP for your testing.
|
Configure nginx to do what you want, test it. Use any Node IP for your testing.
|
||||||
This tool accepts an argument (rewrite_string) which will be replaced using these rules:
|
This will become the 'template_dir' in the argument to the LB.
|
||||||
|
|
||||||
1. For each line that contains rewrite string:
|
Move that directory to somewhere new, i.e. `/etc/nginx-template/`. Make
|
||||||
2. Copy the line once per node IP, replacing the string with host IPs
|
a symlink from that new directory to the old one (i.e.,
|
||||||
|
`ln -s /etc/nginx-template /etc/nginx/`).
|
||||||
|
|
||||||
|
Make a workspace directory for this tool; it will write configs to this folder
|
||||||
|
before updating the symlink you created above. It needs to be persistent so on
|
||||||
|
server reboot the service starts ok (i.e., `mkdir /var/skubelb/`).
|
||||||
|
|
||||||
|
Make sure the user running the tool has read access to the template folder, read-write
|
||||||
|
access to the workspace folder and config symlink.
|
||||||
|
|
||||||
|
Run the server with a command like:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
skubelb --needle some_node_ip \
|
||||||
|
--workspace_dir /var/skubelb \
|
||||||
|
--config_symlink /etc/nginx \
|
||||||
|
--template_dir /etc/nginx-template
|
||||||
|
--listen 0.0.0.0:8080
|
||||||
|
```
|
||||||
|
|
||||||
|
Replacing `some_node_ip` with the node IP you used during the initial setup.
|
||||||
|
|
||||||
|
Next, configure the Kubernetes nodes to POST `http://loadbalancer:8080/register` when
|
||||||
|
they started, and DELETE `http://loadbalancer:8080/register` when they shutdown.
|
||||||
Reference in New Issue
Block a user