Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ jobs:
with:
# Only check external HTTP(S) links, not internal file links
# Internal links are already validated by Docusaurus build (test-build.yml)
args: --verbose --no-progress --scheme https --scheme http './content/**/*.md' './content/**/*.mdx'
args: --verbose --no-progress --insecure --scheme https --scheme http './content/**/*.md' './content/**/*.mdx'
fail: true
85 changes: 0 additions & 85 deletions content/docs/kubernetes/config/load-balancers.md

This file was deleted.

Binary file not shown.
86 changes: 86 additions & 0 deletions content/docs/networking/delete-load-balancer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
title: Deleting a Load Balancer
description: Learn how to delete load balancers on Civo using the Civo Dashboard or Civo CLI to manage billing and free up resources.
sidebar_position: 3
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<head>
<title>Deleting a Civo Load Balancer | Civo Documentation</title>
</head>

## Overview

Load balancers on Civo remain in your account until you delete them. Load balancers in your account are [billed hourly](../account/billing.md) based on the configured maximum concurrent requests and count towards your [account quota](../account/quota.md). If you no longer need a load balancer, you can delete it using the methods below.

:::danger

Load balancer deletion is immediate and irreversible. Ensure your applications no longer depend on the load balancer before deleting it.

:::

<Tabs groupId="delete-loadbalancer">
<TabItem value="dashboard" label="Dashboard">

## Deleting a Load Balancer from the Dashboard

1. Navigate to the [load balancers listing page](https://dashboard.civo.com/loadbalancers) in your Civo dashboard.
2. Find the load balancer you want to delete.
3. Click the **Actions** menu (three dots) next to the load balancer.
4. Select **Delete** from the dropdown menu.
5. Confirm the deletion when prompted.

The load balancer is deleted immediately upon confirmation.

</TabItem>

<TabItem value="cli" label="Civo CLI">

## Deleting a Load Balancer using the Civo CLI

Ensure your current region is set to the one where the load balancer is running. You can delete a load balancer using:

```bash
civo loadbalancer delete <loadbalancer_name_or_id>
```

Civo CLI confirms whether you want to proceed:

```bash
$ civo loadbalancer delete my-loadbalancer
Warning: Are you sure you want to delete the my-loadbalancer load balancer (y/N) ? y
The load balancer (my-loadbalancer) has been deleted
```

:::tip
For scripting use, you can add a `-y` flag to Civo CLI commands which usually require confirmation. This assumes you answer "yes" to any prompt.
:::

</TabItem>
</Tabs>

## What Happens When You Delete a Load Balancer

When you delete a load balancer:

- **Traffic routing stops immediately**: Any traffic directed to the load balancer's public IP address will no longer be routed to your backend instances.
- **Public IP is released**: The public IP address assigned to the load balancer is released and may be reassigned to other customers.
- **Billing stops**: Charges for the load balancer stop immediately upon deletion.
- **Backend instances are unaffected**: Your instances in the instance pool continue running; only the load balancer resource is removed.

## Kubernetes-Managed Load Balancers

If your load balancer was created automatically by a Kubernetes Service of type `LoadBalancer`, deleting it through the dashboard or CLI may cause Kubernetes to recreate it. To properly remove these load balancers:

1. Delete or modify the Kubernetes Service that created the load balancer.
2. The load balancer will be automatically removed by Kubernetes.

```bash
kubectl delete service <service-name>
```

:::warning
Manually deleting a Kubernetes-managed load balancer without removing the associated Service will result in the load balancer being recreated, potentially with a different IP address.
:::
2 changes: 1 addition & 1 deletion content/docs/networking/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ description: Learn how to configure private networks, firewalls, DNS records, an

## Introduction

This section of the Civo documentation covers functionality around networking and Civo resources. It has sections on [private networks](private-networks.md), [firewalls](firewalls.md), domain name service (DNS) records, and [reserved IP addresses](reserved-ip.md).
This section of the Civo documentation covers functionality around networking and Civo resources. It has sections on [load balancers](load-balancers.md), [private networks](private-networks.md), [firewalls](firewalls.md), domain name service (DNS) records, and [reserved IP addresses](reserved-ip.md).
129 changes: 129 additions & 0 deletions content/docs/networking/internal-load-balancer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
---
title: Internal Load Balancers
description: Learn how to create internal load balancers on Civo that are only accessible within your private network, not from the public internet.
sidebar_position: 4
---

<head>
<title>Creating Internal Load Balancers | Civo Documentation</title>
</head>

## Overview

By default, Civo load balancers are assigned a public IP address and are accessible from the internet. However, you may need a load balancer that is only accessible within your private network for internal services, backend APIs, or microservices communication.

An internal load balancer routes traffic only within your Civo private network. External traffic from the internet cannot reach the load balancer, providing an additional layer of security for internal services.

## Why Use an Internal Load Balancer?

Internal load balancers are useful when you need to:

- **Expose internal services**: Route traffic to backend services that should not be publicly accessible (databases, internal APIs, message queues).
- **Implement microservices architecture**: Allow services within your cluster to communicate with each other through a stable endpoint.
- **Improve security**: Reduce the attack surface by keeping internal services off the public internet.
- **Separate traffic tiers**: Use public load balancers for user-facing applications and internal load balancers for backend communication.

## Creating an Internal Load Balancer

To create an internal load balancer, you need to configure a firewall that blocks all inbound traffic from external sources, then attach that firewall to your load balancer.

### Step 1: Create a Firewall with No Inbound Rules

First, create a firewall that has no inbound rules, effectively blocking all external traffic.

#### Using the Dashboard

1. Navigate to **Networking** > **Firewalls** in your Civo dashboard.
2. Click **Create Firewall**.
3. Enter a name for your firewall (e.g., `internal-only`).
4. Do not add any inbound rules.
5. Click **Create Firewall**.

#### Using the Civo CLI

```bash
civo firewall create internal-only
```

This creates a firewall with no rules, which blocks all inbound traffic by default.

### Step 2: Create the Load Balancer with the Firewall

#### Using the Dashboard

1. Navigate to **Networking** > **Load Balancers**.
2. Click **Create Load Balancer**.
3. Configure your load balancer settings (algorithm, instance pool, ports).
4. In the **Firewall** dropdown, select your `internal-only` firewall.
5. Click **Create Load Balancer**.

#### Using Kubernetes

When deploying a Kubernetes Service of type `LoadBalancer`, you can specify the firewall using an annotation:

```yaml
apiVersion: v1
kind: Service
metadata:
name: internal-api
annotations:
kubernetes.civo.com/firewall-id: "internal-only"
spec:
type: LoadBalancer
selector:
app: internal-api
ports:
- protocol: TCP
port: 80
targetPort: 8080
```

:::note
The `kubernetes.civo.com/firewall-id` annotation accepts either a firewall name or ID.
:::

## Verifying Your Internal Load Balancer

After creating your internal load balancer, verify that it is correctly configured.

### Check the Load Balancer Status

Ensure the load balancer is active and has been assigned an IP address:

```bash
civo loadbalancer show <loadbalancer-name>
```

For Kubernetes-managed load balancers:

```bash
kubectl get service internal-api
```

The `EXTERNAL-IP` field shows the assigned IP address, even though it is not publicly accessible.

### Test Internal Access

From an instance or pod within the same private network, verify that you can reach the load balancer:

```bash
curl http://<loadbalancer-ip>
```

This should return a response from your backend service.

### Verify Public Access is Blocked

From outside your Civo network (your local machine or an external server), attempt to connect:

```bash
curl --connect-timeout 5 http://<loadbalancer-ip>
```

This connection should time out, confirming that external access is blocked.

## Related Documentation

- [Firewalls](firewalls.md) - Learn more about configuring firewall rules
- [Private Networks](private-networks.md) - Set up private networks for your instances
- [Load Balancers](load-balancers.md) - General load balancer configuration
Loading
Loading