Skip to content

Getting Started with kOps on Hetzner Cloud

WARNING: Hetzner Cloud support on kOps is currently in alpha, meaning it is subject to change, so please use with caution. The original issue ticket is #8983.


  • kOps version >= 1.24
  • kubectl version >= 1.23
  • Hetzner Cloud account
  • Hetzner Cloud token
  • SSH public and private keys
  • S3 compatible object storage (like MinIO)

Environment Variables

It is important to set the following environment variables:

export HCLOUD_TOKEN=<token>
export S3_ENDPOINT=<endpoint>
export S3_ACCESS_KEY_ID=<acces-key>
export S3_SECRET_ACCESS_KEY=<secret-key>
export KOPS_STATE_STORE=s3://<bucket-name>

Creating a Single Master Cluster

In the following examples, example.k8s.local is a gossip-based DNS cluster name.

# create a ubuntu 20.04 + calico cluster in fsn1
kops create cluster --name=my-cluster.example.k8s.local \
  --ssh-public-key=~/.ssh/ --cloud=hetzner --zones=fsn1 \
  --image=ubuntu-20.04 --networking=calico --network-cidr= 
kops update cluster my-cluster.example.k8s.local --yes

# create a ubuntu 20.04 + calico cluster in fsn1 with CPU optimized servers
kops create cluster --name=my-cluster.example.k8s.local \
  --ssh-public-key=~/.ssh/ --cloud=hetzner --zones=fsn1 \
  --image=ubuntu-20.04 --networking=calico --network-cidr= \
  --node-size cpx31
kops update cluster my-cluster.example.k8s.local --yes

# delete a cluster
kops delete cluster --name=my-cluster.example.k8s.local --yes

# export kubecfg
# See 

# update a cluster
# See

Features Still in Development

kOps for Hetzner Cloud currently does not support the following features:

Next steps

Now that you have a working kOps cluster, read through the recommendations for production setups guide to learn more about how to configure kOps for production workloads.