2025-01-29 23:44:09 +02:00
# NetBird Kubernetes Operator
For easily provisioning access to Kubernetes resources using NetBird.
2025-03-06 10:57:45 +02:00
https://github.com/user-attachments/assets/5472a499-e63d-4301-a513-ad84cfe5ca7b
2025-01-29 23:44:09 +02:00
## Description
2025-03-06 10:57:45 +02:00
This operator easily provides NetBird access on Kubernetes clusters, allowing users to access internal resources directly.
2025-01-29 23:44:09 +02:00
## Getting Started
### Prerequisites
2025-03-06 10:57:45 +02:00
- (Recommended) helm version 3+
2025-01-29 23:44:09 +02:00
- kubectl version v1.11.3+.
- Access to a Kubernetes v1.11.3+ cluster.
2025-03-06 10:57:45 +02:00
- (Recommended) Cert Manager.
2025-01-29 23:44:09 +02:00
2025-03-06 10:57:45 +02:00
### Deployment
> [!NOTE]
> Helm Installation method is recommended due to the automation of multiple settings within the deployment.
#### Using Helm
1. Add helm repository.
```sh
helm repo add netbirdio https://netbirdio.github.io/kubernetes-operator
```
2. (Recommended) Install [cert-manager ](https://cert-manager.io/docs/installation/#default-static-install ).
3. (Recommended) Create a values.yaml file, check `helm show values netbirdio/kubernetes-operator` for more info.
4. Install using `helm install --create-namespace -f values.yaml -n netbird netbird-operator netbirdio/kubernetes-operator` .
> Learn more about the values.yaml options [here](helm/kubernetes-operator/values.yaml) and [Granting controller access to NetBird Management](docs/usage.md#granting-controller-access-to-netbird-management).
#### Using install.yaml
> [!IMPORTANT]
> install.yaml only includes a very basic template for deploying a stripped-down version of Kubernetes-operator.
> This excludes any and all configurations for ingress capabilities and requires the cert-manager to be installed.
2025-01-29 23:44:09 +02:00
```sh
kubectl create namespace netbird
2025-03-06 10:57:45 +02:00
kubectl apply -n netbird -f https://raw.githubusercontent.com/netbirdio/kubernetes-operator/refs/heads/main/manifests/install.yaml
2025-01-29 23:44:09 +02:00
```
2025-03-06 10:57:45 +02:00
### Version
2025-03-06 14:26:12 +01:00
We have developed and executed tests against Kubernetes v1.31, but it should work with most recent Kubernetes version.
Latest operator version: v0.1.1.
2025-01-29 23:44:09 +02:00
2025-03-06 10:57:45 +02:00
Tested against:
2025-03-06 14:26:12 +01:00
|Distribution|Test status|Kubernetes Version|
|---|---|---|
|Google GKE|Pass|1.31.5|
|AWS EKS|Pass|1.31|
|Azure AKS|Not tested|N/A|
|OpenShift|Not tested|N/A|
2025-01-29 23:44:09 +02:00
2025-03-06 10:57:45 +02:00
> We would love community feedback to improve the test matrix. Please submit a PR with your test results.
2025-01-29 23:44:09 +02:00
2025-03-06 10:57:45 +02:00
### Usage
2025-01-29 23:44:09 +02:00
2025-03-06 10:57:45 +02:00
Check the usage of [usage.md ](docs/usage.md ) and examples.
2025-01-29 23:44:09 +02:00
## Contributing
### Prerequisites
2025-03-06 10:57:45 +02:00
To be able to develop this project, you need to have the following tools installed:
2025-01-29 23:44:09 +02:00
- [Git ](https://git-scm.com/ ).
- [Make ](https://www.gnu.org/software/make/ ).
- [Go programming language ](https://golang.org/dl/ ).
- [Docker CE ](https://www.docker.com/community-edition ).
- [Kubernetes cluster (v1.16+) ](https://kubernetes.io/docs/setup/ ). [KIND ](https://github.com/kubernetes-sigs/kind ) is recommended.
- [Kubebuilder ](https://book.kubebuilder.io/ ).
### Running tests
**Running unit tests**
```sh
make test
```
**Running E2E tests**
```sh
kind create cluster # If not already created, you can check with `kind get clusters`
make test-e2e
```