Skip to content

Commit

Permalink
Added documentation in the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
peterklijn committed Jun 25, 2024
1 parent 6ae753c commit 45190fe
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,30 @@ Start provisioning of the cluster using the following command:
ansible-playbook playbooks/site.yml -i inventory.yml
```

### Using an external database

If an external database is preferred, this can be achieved by passing the `--datastore-endpoint` as an extra server argument as well as setting the `use_external_database` flag to true.

```bash
k3s_cluster:
children:
server:
hosts:
192.16.35.11:
192.16.35.12:
agent:
hosts:
192.16.35.13:

vars:
use_external_database: true
extra_server_args: "--datastore-endpoint=postgres://username:password@hostname:port/database-name"
```

The `use_external_database` flag is required when more than one server is defined, as otherwise an embedded etcd cluster will be created instead.

The format of the datastore-endpoint parameter is dependent upon the datastore backend, please visit the [K3s datastore endpoint format](https://docs.k3s.io/datastore#datastore-endpoint-format-and-functionality) for details on the format and supported datastores.

## Upgrading

A playbook is provided to upgrade K3s on all nodes in the cluster. To use it, update `k3s_version` with the desired version in `inventory.yml` and run:
Expand Down

0 comments on commit 45190fe

Please sign in to comment.