cluster-api-provider-hetzner

command module
v1.0.0-beta.35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

README ΒΆ

Kubernetes Cluster API Provider Hetzner

Guide | Docs Index | Development Docs

Cluster API Book


GitHub release GoDoc Go Report Card CII Best Practices License Latest quay.io image tags

The Kubernetes Cluster API Provider Hetzner enables declarative provisioning of multiple Kubernetes clusters on Hetzner infrastructure.

High-available Kubernetes clusters on bare metal and cloud instances are supported.

The Cluster API simplifies the creation, updates, and operation of production-ready clusters. Self-managed Kubernetes clusters can, therefore, be easily operated even at a large scale.

Disclaimer: This is not an official Hetzner project! It is maintained by Syself. If you have questions or are interested in running production-ready Kubernetes clusters on Hetzner, then please contact us via e-mail: info@syself.com.

πŸ“° What is the Cluster API Provider Hetzner?

The Cluster API orchestrates infrastructure similar to the way Kubernetes manages containers. It implements a declarative API like Kubernetes does and extends the resources of the Kubernetes API server via CRDs.

The Cluster API consists of the CAPI controller, the control-plane provider, the bootstrap provider, and an infrastructure provider.

The controllers ensure that the desired state of the infrastructure is achieved - just as Kubernetes ensures the desired state of containers. The concept of Kubernetes Controller has significant advantages over Infrastructure as Code (IaC) solutions because it can react automatically to changes and problems. The best example of this is the MachineHealthCheck, which replaces unhealthy nodes automatically.

Using the Cluster API Provider Hetzner (CAPH) unites the benefits of declarative infrastructure, cost-effectiveness, and (GDPR-compliant) European cloud.

πŸ“ž Support

Supporting your Kubernetes journey is our priority at Syself.

If you require expert assistance in managing production-ready clusters with CAPH, connect with the seasoned experts at Syself.

Contact us via info@syself.com for top-notch support on your Kubernetes adventure.

✨ Features of CAPH

  • Native Kubernetes manifests and API
  • Choice of Linux distribution
  • Support for single and multi-node control plane clusters (HA Kubernetes)
  • Support for Hetzner Cloud placement groups, network, and load balancer
  • Complete day 2 operations - updating Kubernetes and nodes, scaling up and down, self-healing
  • Custom CSR approver for approving kubelet-serving certificate signing requests
  • Hetzner dedicated servers / bare metal (and GPUs)

πŸ‘€ Clarifying Scope

If you are new to Kubernetes, we want you to know that managing a production-grade Kubernetes system requires a dedicated team of experts.

The Cluster API Provider Hetzner (CAPH) deals with the lifecycle management of machines and infrastructure.

Here are several aspects that CAPH will not handle for you:

  • production-ready node images
  • secured kubeadm configuration
  • incorporation of cluster add-ons, such as CNI (e.g. cilium), metrics-server, konnectivity-service, etc.
  • testing & update procedures of Kubernetes version, configuration
  • backup procedures
  • monitoring strategies
  • alerting systems
  • identity and Access Management (IAM)

If you don't have a dedicated team for managing Kubernetes, you can use Syself Autopilot and enjoy a multitude of benefits including:

  • Consistent, regular updates that allow you to access the latest features.
  • Reduction in workload for your DevOps team as Syself takes over the responsibility of maintaining the system, ensuring seamless updates, and creating new clusters quickly and efficiently.
  • Expertise in dealing with the Cluster API and Hetzner, enabling quicker resolution of issues.

πŸš€ Get Started

If you're looking to jump straight into it, go ahead:

In addition to the pure creation and operation of Kubernetes clusters, this provider can also validate and approve certificate signing requests. This increases security as the kubelets of the nodes can be operated with signed certificates. This enables the metrics-server to run securely. Click here to read more about the CSR controller.

πŸ”₯ Compatibility with Cluster API and Kubernetes Versions

This provider's versions are compatible with the following versions of Cluster API:

Cluster API v1beta1 (v1.5.x) Cluster API v1beta1 (v1.6.x)
Hetzner Provider v1.0.0-beta.26 βœ“ β˜“
Hetzner Provider v1.0.0-beta.27 β˜“ βœ“

This provider's versions can install and manage the following versions of Kubernetes:

Hetzner Provider v1.0.x
Kubernetes 1.23.x βœ“
Kubernetes 1.24.x βœ“
Kubernetes 1.25.x βœ“
Kubernetes 1.26.x βœ“
Kubernetes 1.27.x βœ“
Kubernetes 1.28.x βœ“

Test status:

  • βœ“ tested
  • + should work, but we weren't able to test it

Each version of Cluster API for Hetzner will attempt to support at least two Kubernetes versions.

NOTE: As the versioning for this project is tied to the versioning of Cluster API, future modifications to this policy may be made to more closely align with other providers in the Cluster API ecosystem.


πŸ”³ Operating System Images

Note: Cluster API Provider Hetzner relies on a few prerequisites, which have to be already installed in the used operating system images, e.g. a container runtime, kubelet, and Kubeadm. Reference images can be found in kubernetes-sigs/image-builder and templates/node-image. If it isn't possible to pre-install these prerequisites in the image, you can always deploy and execute some custom scripts through the Kubeadm config. Read more...


πŸ“– Documentation

Docs can be found in the /docs directory. Here you can find an overview of our documentation.

πŸ‘₯ Getting Involved and Contributing

Are you interested in contributing to Cluster API Provider Hetzner? We, the maintainers and community, would love your suggestions, contributions, and help! If you want to learn more about how to get involved, you can contact the maintainers at any time.

To set up your environment, try out the development guide.

In the interest of getting more new people involved, we tag issues with good first issue. These are typically issues that have a smaller scope but are good for getting acquainted with the codebase.

We also encourage ALL active community participants to act as if they are maintainers, even if you don't have "official" write permissions. This is a community effort, we are here to serve the Kubernetes community. If you have an active interest and you want to get involved, you have real power! Don't assume that the only people who can get things done around here are the "maintainers".

We would also love to add more "official" maintainers, so show us what you can do!

πŸ’« Code of Conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.

:shipit: Github Issues

πŸ› Bugs

If you think you have found a bug, please follow these steps:

  • Take some time to give due diligence to the issue tracker. Your issue might be a duplicate.
  • Get the logs from the cluster controllers. Paste this into your issue.
  • Open a bug report.
  • Give it a meaningful title to help others who might be searching for your issue in the future.
  • If you have questions, reach out to the Cluster API community on the Kubernetes Slack channel.

⭐ Tracking New Features

We also use the issue tracker to track features. If you have an idea for a feature or think that you can help Cluster API Provider Hetzner become even more awesome, then follow these steps:

  • Open a feature request.
  • Give it a meaningful title to help others who might be searching for your issue in the future.
  • Define clearly the use case. Use concrete examples, e.g. "I type this and Cluster API Provider Hetzner does that".
  • Some of our larger features will require some design. If you would like to include a technical design for your feature, please include it in the issue.
  • After the new feature is well understood and the design is agreed upon, we can start coding the feature. We would love it if you code it. So please open up a WIP (work in progress) pull request. Happy coding!

Documentation ΒΆ

Overview ΒΆ

Package main contains main function to start CAPH.

Directories ΒΆ

Path Synopsis
api
v1beta1
Package v1beta1 contains API Schema definitions for the infrastructure v1beta1 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io
Package v1beta1 contains API Schema definitions for the infrastructure v1beta1 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io
Package controllers implements controller types.
Package controllers implements controller types.
hack
tools Module
pkg
csr
Package csr contains functions to validate certificate signing requests.
Package csr contains functions to validate certificate signing requests.
scope
Package scope defines cluster and machine scope as well as a repository for the Hetzner API.
Package scope defines cluster and machine scope as well as a repository for the Hetzner API.
secrets
Package secretutil contains functions to manage secrets and strategies to manage secret cache.
Package secretutil contains functions to manage secrets and strategies to manage secret cache.
services/baremetal/baremetal
Package baremetal implements functions to manage the lifecycle of baremetal machines as inventory.
Package baremetal implements functions to manage the lifecycle of baremetal machines as inventory.
services/baremetal/client
Package client contains ssh and robot API clients.
Package client contains ssh and robot API clients.
services/baremetal/client/mocks
Package mocks defines factories that allow the usage of generated mocks in unit tests.
Package mocks defines factories that allow the usage of generated mocks in unit tests.
services/baremetal/client/robot
Package robotclient contains the interface to speak to Hetzner robot API.
Package robotclient contains the interface to speak to Hetzner robot API.
services/baremetal/client/ssh
Package sshclient contains the interface to speak to bare metal servers with ssh.
Package sshclient contains the interface to speak to bare metal servers with ssh.
services/baremetal/host
Package host manages the state and reconcilement of bare metal host objects.
Package host manages the state and reconcilement of bare metal host objects.
services/baremetal/remediation
Package remediation implements functions to manage the lifecycle of baremetal remediation.
Package remediation implements functions to manage the lifecycle of baremetal remediation.
services/hcloud/client
Package hcloudclient defines and implements the interface for talking to Hetzner HCloud API.
Package hcloudclient defines and implements the interface for talking to Hetzner HCloud API.
services/hcloud/client/fake
Package fake implements fakes for important interfaces like the HCloud API.
Package fake implements fakes for important interfaces like the HCloud API.
services/hcloud/loadbalancer
Package loadbalancer implements the lifecycle of HCloud load balancers.
Package loadbalancer implements the lifecycle of HCloud load balancers.
services/hcloud/machinetemplate
Package machinetemplate implements functions to manage the lifecycle of HCloud machine templates.
Package machinetemplate implements functions to manage the lifecycle of HCloud machine templates.
services/hcloud/network
Package network implements the lifecycle of HCloud networks.
Package network implements the lifecycle of HCloud networks.
services/hcloud/placementgroup
Package placementgroup implements the lifecycle of HCloud placement groups.
Package placementgroup implements the lifecycle of HCloud placement groups.
services/hcloud/remediation
Package remediation implements functions to manage the lifecycle of hcloud remediation.
Package remediation implements functions to manage the lifecycle of hcloud remediation.
services/hcloud/server
Package server implements functions to manage the lifecycle of HCloud servers.
Package server implements functions to manage the lifecycle of HCloud servers.
services/hcloud/util
Package hcloudutil contains utility functions for hcloud servers.
Package hcloudutil contains utility functions for hcloud servers.
utils
Package utils implements some utility functions.
Package utils implements some utility functions.
version
Package version implements version handling code.
Package version implements version handling code.
test
e2e
Package e2e provides methods to test CAPH provider integration e2e.
Package e2e provides methods to test CAPH provider integration e2e.
helpers
Package helpers includes helper functions important for unit and integration testing.
Package helpers includes helper functions important for unit and integration testing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL