Skip to content

A CLI tool for provisioning kubernetes clusters on Hetzner Cloud

License

Notifications You must be signed in to change notification settings

Baughn/hetzner-kube

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

hetzner-kube: fast and easy setup of kubernetes clusters on Hetzner Cloud

This project contains a CLI tool to easily provision kubernetes clusters on Hetzner Cloud.

This is my very first tool written in Go.

How to install

Get the linux binary from releases page.

Download version 0.2.1 - linux-amd64

or get it from source:

$ go get -u github.com/xetys/hetzner-kube

Usage

In your Hetzner Console generate an API token and

$ hetzner-kube context add my-project
Token: <PASTE-TOKEN-HERE>

Then you need to add an SSH key:

$ hetzner-kube ssh-key add -n my-key

This assumes, you already have a SSH keypair ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub

And finally you can create a cluster by running:

$ hetzner-kube cluster create --name my-cluster --ssh-key my-key

This will provision a brand new kubernetes cluster in latest version!

HA-clusters

You can built high available clusters with hetzner-kube. Read the High availability Guide for further information.

Custom Options

addons

You can install some addons to your cluster using the cluster addon sub-command. Currently these are the supported first addons:

  • helm
  • Rook
  • OpenEBS
  • NGinx ingress controller (requires helm)

contributing new addons

Feel free to contribute cluster addons. You can simply create one by implementing the ClusterAddon interface and adding it to the addons.

cloud-init

If you like to run some scripts or install some additional packages while provisioning new servers you can use cloud-init

$ hetzner-kube cluster create --name my-cluster --nodes 3 --ssh-key my-key --cloud-init <PATH-TO-FILE>

An example file to make all nodes ansible ready. The comment on the first line is important:

#cloud-config
package_update: true
packages:
 - python

Full tutorial

This article guides through a full cluster setup.

About

A CLI tool for provisioning kubernetes clusters on Hetzner Cloud

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.7%
  • Shell 1.3%