diff options
author | Joseph Henry <josephjah@gmail.com> | 2016-08-17 15:35:00 -0700 |
---|---|---|
committer | Joseph Henry <josephjah@gmail.com> | 2016-08-17 15:35:00 -0700 |
commit | 1833c6155603c05ff56b260a27dcaa0037836c15 (patch) | |
tree | cf5c93631d6ca7efad40518d2b3790a19237c1eb /doc | |
parent | ba78676ace0ffb2c0d43f2897341f1664b7c3037 (diff) | |
download | infinitytier-1833c6155603c05ff56b260a27dcaa0037836c15.tar.gz infinitytier-1833c6155603c05ff56b260a27dcaa0037836c15.zip |
kubernetes tutorial update
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ext/ztkube.md | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/doc/ext/ztkube.md b/doc/ext/ztkube.md index 6670e926..be176a33 100644 --- a/doc/ext/ztkube.md +++ b/doc/ext/ztkube.md @@ -9,9 +9,9 @@ This is a quick tutorial for setting up a Kubernetes deployment which can self-a ## Preliminary tasks -**Step 1: Go to [my.zerotier.com](https://my.zerotier.com) and generate an API key. This key will be used by ZeroTier to automatically authorize new instances of your VMs to join your deployment network during replication.**a +**Step 1: Go to [my.zerotier.com](https://my.zerotier.com) and generate an API key. This key will be used by ZeroTier to automatically authorize new instances of your VMs to join your deployment network during replication.** -**Step 2: Create a new `private` network. Take note of the network ID: `nwid`** +**Step 2: Create a new `private` network. Take note of the network ID, henceforth: `nwid`** **Step 3: Follow the instructions from the [hellonode](ttp://kubernetes.io/docs/hellonode/) tutorial and set up your development system (install Google Cloud SDK).** @@ -24,17 +24,8 @@ This is a quick tutorial for setting up a Kubernetes deployment which can self-a - `mkdir ztkube` Add the following files to the `ztkube` directory. These files will be compiled into the Docker image. - - -Create an empty file to specify the private deployment network you created in *Step 2*: - - `<nwid>.conf` - - -``` -./zerotier -zerotier-cli join $(NWID).conf -zerotier-cli net-auth $(NWID) $(DEVID) -``` + + - Create an empty `<nwid>.conf` file to specify the private deployment network you created in *Step 2*: - The CLI tool config file `.zerotierCliSettings` should contain your API keys to authorize new devices on your network. In this example the default controller is hosted by us at [my.zerotier.com](https://my.zerotier.com). Alternatively, you can host your own network controller but you'll need to modify the CLI config file accordingly. @@ -73,7 +64,13 @@ COPY .zerotierCliSettings <settings path>?> CMD node server.js ``` - - The `entrypoint.sh` script will start the ZeroTier service in the VM, attempt to join your deployment network and automatically authorize the new VM if your network is set to private. + - The `entrypoint.sh` script will start the ZeroTier service in the VM, attempt to join your deployment network and automatically authorize the new VM if your network is set to private: + +``` +./zerotier +zerotier-cli join $(NWID).conf +zerotier-cli net-auth $(NWID) $(DEVID) +``` **Step 5: Lastly, build the image:** @@ -81,11 +78,12 @@ CMD node server.js -**Step 6: Push the docker image to your *Container Registry** +**Step 6: Push the docker image to your *Container Registry*** `gcloud docker push gcr.io/$PROJECT_ID/hello-node:v1` +## Deploy! **Step 7: Create Kubernetes Cluster** @@ -107,4 +105,6 @@ CMD node server.js `kubectl scale deployment hello-node --replicas=4` -Now, after a minute or so you can use `zerotier-cli net-members <nwid>` to show all of your VM instances on your ZeroTier deployment network. If you haven't [configured your local CLI](), you can simply log into [my.zerotier.com](https://my.zerotier.com), go to *Networks -> <nwid>*. +## Verify + +Now, after a minute or so you can use `zerotier-cli net-members <nwid>` to show all of your VM instances on your ZeroTier deployment network. If you haven't [configured your local CLI](), you can simply log into [my.zerotier.com](https://my.zerotier.com), go to *Networks -> nwid*. |