Scaleway image to run Kubernetes
This will create a highly-available (multi-master) Kubernetes cluster on top of scaleway, built on top of the scaleway docker image. Currently, this has only been tested with x86_64 however armhf support will be added soon.
Because scaleway does not support multiple-IPs per server, nor does it support loadbalancers, you'll need to use round-robin DNS to balance traffic across each Kubernetes node.
Due to the limited configuration parameters with Scaleway, it is required that you build your own image with Kubernetes certificates baked into your image. Because of this, setup is slightly more complex than I'd like it to be.
- Spin-up an image builder instance on scaleway, and clone this repository onto it:
$ git clone https://github.com/munnerz/scaleway-k8s.git
- Place your keys, certificate, cluster CA and auth files into rootfs/etc/kubernetes:
apiserver-key.pem
: the apiserver private keyapiserver.pem
: the api server certificatebasic_auth.csv
: basic auth accountsca.pem
: the cluster CA certificateknown_tokens.csv
: token auth accounts
You can generate the openssl certificates using the CoreOS guide: https://coreos.com/kubernetes/docs/latest/openssl.html
-
Run
make install
- this by default will write everything needed to the volume attached to your builder instance at/dev/nbd1
. To change the volume name, set theDISK
environment variables (eg.DISK=/dev/vdb make install
) -
Shut down your builder instance and snapshot the attached disk. You can then create an image from this snapshot and then a new VM from your new image.
-
When creating the new servers, make sure to select the
docker
boot script. -
If you start a new cluster you need an etcd discovery link as start point. You can get one at https://discovery.etcd.io/new?size=3 (adjust the
size
parameter according to how many etcd nodes you will initially have in your cluster) -
Add your discover link as a tag to your server in format discover:https://discovery.etcd.io/secretkeyyougot. Make sure it is the first tag!
-
Set a second tag with your Scaleway access key and token in format api:accesskey:token.
Repeat steps 5-8 for each instance that should be in your etcd cluster.
The cluster will take a few minutes to properly come online.