Skip to content

Bootstrap a basic kubernetes cluster on Hetzner cloud! ☁️🎊

License

Notifications You must be signed in to change notification settings

jedevc/hcloud_kube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hcloud_kube

A simple collection of scripts for bootstrapping a simply k8s cluster on Hetzner Cloud.

Dependencies

You'll need:

  • hcloud
  • kubectl
  • Other pretty standard linux utils (Bash, SSH, etc)

Quickstart

Create a kubernetes cluster with 2 CX21 nodes:

$ export HCLOUD_TOKEN=<api token>
$ ./hcloud_kube -t cx21 -n 2

Usage

  1. Create a new project

  2. Create a new API token in the project

  3. Create a local environment variable HCLOUD_TOKEN with the value of the token.

    $ export HCLOUD_TOKEN=<api token>
  4. Run the hcloud script

    $ ./hcloud_kube
  5. You can then copy the kube admin config

    $ cp /tmp/hcloud_kube/admin.conf ~/.kube/config
  6. You probably also want to save the generated ssh keys (in case you want to ssh in later)

    $ cp /tmp/hcloud_kube/provision_key* ~

Configuration

Command line options

  • -t TYPE (default: cx21)

    The hetzner instance type for each node.

  • -n COUNT (default: 0)

    The number of hetzner workers to provision.

    If set to 0, the master node is tainted to accept pods.

For additional configuration, dive in, and edit the script - it's meant to be built upon.

References

https://community.hetzner.com/tutorials/install-kubernetes-cluster

License

Because this tool is short and sweet, it is hereby released into the public domain. Do whatever you want.

About

Bootstrap a basic kubernetes cluster on Hetzner cloud! ☁️🎊

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages