cluster-api-provider-hetzner

command module
v1.0.1 Latest Latest
Warning

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

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

README ΒΆ

Kubernetes Cluster API Provider Hetzner


Quickstart | Docs | Cluster API Book

⭐ Consider leaving a star β€” it motivates us a lot! ⭐


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

Table of Contents

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

[!NOTE] The Cluster API Provider Hetzner is independently maintained by Syself and the community. It is not an official Hetzner project.

If you have any questions about this project, please start a conversation in the Discussions tab or contact us at contact@syself.com.

The Cluster API Provider Hetzner (CAPH) provides a way to declaratively create and manage infrastructure on Hetzner, in a Kubernetes-native way. It extends the Kubernetes API with Custom Resource Definitions (CRDs) allowing you to interact with clusters in the same fashion you interact with workload.

Key benefits include:

  • Self-healing: CAPH and CAPI controllers react to every change in your infrastructure, identifying and resolving issues without human intervention
  • Declarative: Specify the desired state of your infrastructure and let the operators do the rest, ensuring repeatability and idempotency
  • Kubernetes native: Everything is a Kubernetes resource, meaning you can use tools you're already familiar with while working with CAPH

CAPH enables you to have DIY Kubernetes on Hetzner at any scale, with full control over your infrastructure and clusters configuration.

If you want a batteries-included solution instead, you can try Syself free for 14 days.

πŸ“– Documentation

Documentation can be found at caph.syself.com. You can contribute to it by modifying the contents of the /docs directory.

πŸš€ Getting Started

The best way to get started with CAPH is to spin up a cluster. For that you can follow our Managing Kubernetes on Hetzner with Cluster API article featured in the Hetzner Community Tutorials.

Additional resources from the documentation:

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, and 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:

CAPI v1beta1 (v1.7.x) CAPI v1beta1 (v1.8.x)
Hetzner Provider v1.0.0-beta.34-43 βœ… ❌
Hetzner Provider v1.0.0 βœ… βœ…

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

Hetzner Provider v1.0.x
Kubernetes 1.28.x βœ…
Kubernetes 1.29.x βœ…
Kubernetes 1.30.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

Cluster API Provider Hetzner relies on a few prerequisites that must be already installed in the operating system images, such as a container runtime, kubelet, and kubeadm.

Reference images are available in kubernetes-sigs/image-builder and templates/node-image.

If it's not possible to pre-install these prerequisites, custom scripts can be deployed through the kubeadm config.

In case you want a solution with managed node images, Syself might be interesting for you.

🀝 Getting Involved and Contributing

We, the maintainers and the community, welcome any contributions to Cluster API Provider Hetzner. Feel free to contact the maintainers for suggestions, contributions and help.

To set up your environment, refer to the development guide.

For new contributors, check out issues tagged as good first issue. These are typically smaller in scope and great for getting familiar with the codebase.

We encourage all active community members to act as if they were maintainers, even without "official" write permissions. This is a collaborative effort serving 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 and paste them in your issue.
  • Open a bug report.
  • Give it a meaningful title to help others who might be searching for your issue in the future.
  • For 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.
  • Clearly define the use case with 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.
  • Once the new feature is well understood and the design is agreed upon, we can start coding. We would love for you to take part in this process, so we encourage you to take the lead and start coding it yourself. Please open a WIP (work in progress) pull request. Happy coding!

πŸ’¬ Contact

For more information about Syself, our platform, or any generall information about the Cluster API Provider Hetzner, feel free to reach out to us. Below are some ways to contact our team:

Kubernetes Cluster API Provider Hetzner

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