Add HA step to the Kubernetes doc (#152)

This commit is contained in:
Maycon Santos
2024-02-25 10:04:01 +01:00
committed by GitHub
parent 205e6ebefa
commit 7b1b68ff68

View File

@@ -64,7 +64,7 @@ Click on Name & Description to give your policy a name and description. Then cli
</p> </p>
### Step 4: Deploy the NetBird agent ### Step 4: Deploy the NetBird agent
You can deploy the NetBird agent using a daemon set or a deployment. Below is an example of a deployment configuration with 3 replicas. You can deploy the NetBird agent using a daemon set or a deployment. Below is an example of a deployment configuration with 1 replica.
```yaml ```yaml
--- ---
@@ -74,7 +74,7 @@ metadata:
name: netbird name: netbird
namespace: default namespace: default
spec: spec:
replicas: 3 replicas: 1
selector: selector:
matchLabels: matchLabels:
app: netbird app: netbird
@@ -112,7 +112,25 @@ kubectl apply -f deployment.yml
In this example the setup key is passed as an environment variable. You should use a secret to pass the setup key. In this example the setup key is passed as an environment variable. You should use a secret to pass the setup key.
</Note> </Note>
### Step 5: Verify the deployment ### Step 5: Make the deployment highly available
NetBird network routes support multiple routing peers running in a fail-over mode, where one routing peer will be select
as gateway for a network and when this peer becomes unavailable other routing peer will be select for the role, proving a
highly available network route.
To make the deployment highly available, you can increase the number of replicas in the deployment configuration to 3 or more.
```yaml
---
...
spec:
replicas: 3
...
```
Apply the updated deployment file to your Kubernetes cluster using the following command:
```shell
kubectl apply -f deployment.yml
```
### Step 6: Verify the deployment
After deploying the NetBird agent, you can verify that the agent is running by checking the logs of the pods. After deploying the NetBird agent, you can verify that the agent is running by checking the logs of the pods.
```shell ```shell