-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from n3tuk/add-k3s-testing
Add initial k3s configuration with `testing` clusters
- Loading branch information
Showing
39 changed files
with
583 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,45 @@ | ||
--- | ||
# Kubernetes nodes cannot operate with swap enabled, so ensure the filesystems | ||
# are reconfigured to exclude that list. | ||
filesystems_logical_volumes: | ||
- name: system | ||
group: storage | ||
path: / | ||
size: 8G | ||
fs_type: ext4 | ||
fs_opts: -L SYSTEM | ||
- name: journald | ||
group: storage | ||
path: /var/log/journal | ||
size: 256M | ||
fs_type: ext4 | ||
fs_opts: -L JOURNALD | ||
mount_opts: | ||
- nosuid | ||
- nodev | ||
- noexec | ||
- name: pacman | ||
group: storage | ||
path: /var/cache/pacman | ||
size: 2G | ||
fs_type: ext4 | ||
fs_opts: -L PACMAN | ||
mount_opts: | ||
- nosuid | ||
- nodev | ||
- noexec | ||
- name: home | ||
group: storage | ||
path: /home | ||
size: 256M | ||
fs_type: ext4 | ||
fs_opts: -L HOME | ||
mount_opts: | ||
- nosuid | ||
- nodev | ||
- name: rancher | ||
group: storage | ||
path: /var/lib/rancher | ||
size: 32G | ||
fs_type: ext4 | ||
fs_opts: -L RANCHER |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
env_name: testing | ||
env_location: cym-south-1 | ||
env_colour: bright-yellow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
env_purpose: k3s-single-node | ||
|
||
systemd_networkd_ipv4_address: 172.23.39.2/24 | ||
systemd_networkd_ipv4_gateway: 172.23.39.1 | ||
systemd_networkd_ipv6_address: 2a02:8010:8006:3a39:65:a6ff:fee8:a87a/64 | ||
|
||
bird_interface: "br-*" | ||
|
||
k3s_region: cym-south-1 | ||
k3s_zone: cym-south-1a | ||
|
||
k3s_cluster_init: true | ||
|
||
k3s_service_cidr: 172.24.0.0/22 | ||
k3s_cluster_dns: 172.24.0.10 | ||
k3s_cluster_cidr: 172.24.64.0/18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
env_purpose: k3s-single-node | ||
|
||
systemd_networkd_ipv4_address: 172.23.39.3/24 | ||
systemd_networkd_ipv4_gateway: 172.23.39.1 | ||
systemd_networkd_ipv6_address: 2a02:8010:8006:3a39:1e:a3ff:fef7:def2/64 | ||
|
||
bird_interface: "br-*" | ||
|
||
k3s_region: cym-south-1 | ||
k3s_zone: cym-south-1a | ||
|
||
k3s_cluster_init: true | ||
|
||
k3s_service_cidr: 172.24.4.0/22 | ||
k3s_cluster_dns: 172.24.4.10 | ||
k3s_cluster_cidr: 172.24.128.0/18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
# Configure the caching service for Arch Linux repositories | ||
|
||
- name: Configure hosts for a single-node k3s deployments | ||
hosts: testing | ||
become: true | ||
become_user: root | ||
roles: | ||
- role: k3s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
# Configure the caching service for Arch Linux repositories | ||
|
||
- name: Configure the host for a single-node Kubernetes deployment | ||
hosts: minikube | ||
become: true | ||
become_user: root | ||
roles: | ||
# - role: bird | ||
- role: k3s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# n3t.uk Kubernetes (k3s) Ansible Role | ||
|
||
An Ansible role for the host preparation for the deployment of a Kubernetes | ||
cluster, in both single-node and multi-node configurations, alongside the | ||
creation and mounting of filesystems and the installation and configuration of | ||
required system packages. | ||
|
||
## Requirements | ||
|
||
None. | ||
|
||
## Role Variables | ||
|
||
None. | ||
|
||
## Dependencies | ||
|
||
None. | ||
|
||
## Example Playbook | ||
|
||
```yaml | ||
--- | ||
- name: Configure a Kubernetes node | ||
hosts: all | ||
become: true | ||
become_user: root | ||
roles: | ||
- role: k3s | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
# defaults file for k3s | ||
|
||
k3s_node_type: server | ||
|
||
k3s_node_region: unknown-1 | ||
k3s_node_zone: unknown-1a | ||
|
||
k3s_node_labels: [] | ||
k3s_node_taints: [] | ||
|
||
k3s_node_name: "{{ ansible_hostname }}" | ||
k3s_bind_address: "{{ ansible_default_ipv4.address }}" | ||
k3s_https_listen_port: 6433 | ||
|
||
k3s_flannel_backend: vxlan | ||
k3s_service_cidr: 172.23.8.0/21 | ||
k3s_cluster_dns: 172.23.8.10 | ||
k3s_cluster_cidr: 172.23.16.0/20 | ||
k3s_egress_selector_mode: agent | ||
|
||
k3s_cluster_init: false | ||
k3s_tls_san: | ||
- "{{ ansible_fqdn }}" | ||
|
||
k3s_disable_helm_controller: true | ||
k3s_disable_network_policy: true | ||
k3s_disable_embedded_registry: true | ||
|
||
k3s_service_disable: | ||
- servicelb | ||
- traefik | ||
- local-storage | ||
- metrics-server |
Oops, something went wrong.