Skip to content

Commit

Permalink
Add network attached instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Daemonslayer2048 committed Jan 3, 2025
1 parent b31aa88 commit 6aa4f43
Show file tree
Hide file tree
Showing 17 changed files with 339 additions and 30 deletions.
38 changes: 12 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Ansible RKE2 (RKE Government) Playbook
---------
[![LINT](https://github.com/rancherfederal/rke2-ansible/actions/workflows/ci.yml/badge.svg)](https://github.com/rancherfederal/rke2-ansible/actions/workflows/ci.yml)

RKE2, also known as RKE Government, is Rancher's next-generation Kubernetes distribution. This Ansible playbook installs RKE2 for both the control plane and workers.
RKE2, also known as RKE Government, is Rancher's next-generation Kubernetes distribution. This Ansible playbook installs RKE2 for both the control plane and workers.

See the [docs](https://docs.rke2.io/) more information about [RKE Government](https://docs.rke2.io/).

Expand All @@ -49,20 +49,10 @@ Supported Operating Systems:

System requirements
-------------------

Deployment environment must have Ansible 2.9.0+

Server and agent nodes must have passwordless SSH access

Usage
-----

This playbook requires ansible.utils to run properly. Please see https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-a-collection-from-galaxy for more information about how to install this.

```
ansible-galaxy collection install -r requirements.yml
```

Create a new directory based on the `sample` directory within the `inventory` directory:

```bash
Expand Down Expand Up @@ -94,32 +84,28 @@ Start provisioning of the cluster using the following command:

```bash
ansible-playbook site.yml -i inventory/my-cluster/hosts.yml
```
```

More detailed information can be found [here](./docs/usage.md)

Tarball Install/Air-Gap Install
-------------------------------
Added the neeed files to the [tarball_install](tarball_install/) directory.

Further info can be found [here](tarball_install/README.md)
Tarball Install/Air-Gap Install
-------------------------------
Air-Gap/Tarball install information can be found [here](./docs/tarball_install.md)


Kubeconfig
----------
The root user will have the `kubeconfig` and `kubectl` made available, to access your cluster login into any server node and `kubectl` will be available for use immideatly.

To get access to your **Kubernetes** cluster just

```bash
ssh ec2-user@rke2_kubernetes_api_server_host "sudo /var/lib/rancher/rke2/bin/kubectl --kubeconfig /etc/rancher/rke2/rke2.yaml get nodes"
```

Available configurations
------------------------

Available configurations
------------------------
Variables should be set in `inventory/cluster/group_vars/rke2_agents.yml` and `inventory/cluster/group_vars/rke2_servers.yml`. See sample variables in `inventory/sample/group_vars` for reference.


Uninstall RKE2
---------------
Uninstall RKE2
---------------
Note: Uninstalling RKE2 deletes the cluster data and all of the scripts.
The offical documentation for fully uninstalling the RKE2 cluster can be found in the [RKE2 Documentation](https://docs.rke2.io/install/uninstall/).

Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/advanced_sample_inventory/group_vars/all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
rke2_install_version: v1.29.12+rke2r1

Check warning on line 1 in docs/advanced_sample_inventory/group_vars/all.yaml

View workflow job for this annotation

GitHub Actions / Lint for push

1:1 [document-start] missing document start "---"

Check failure on line 1 in docs/advanced_sample_inventory/group_vars/all.yaml

View workflow job for this annotation

GitHub Actions / Lint for push

1:38 [trailing-spaces] trailing spaces
cluster_rke2_config:
selinux: true

Check failure on line 3 in docs/advanced_sample_inventory/group_vars/all.yaml

View workflow job for this annotation

GitHub Actions / Lint for push

3:16 [new-line-at-end-of-file] no new line character at the end of file
17 changes: 17 additions & 0 deletions docs/advanced_sample_inventory/group_vars/rke2_servers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
rke2_pod_security_admission_config_file_path: "{{ playbook_dir }}/docs/advanced_sample_inventory/files/pod-security-admission-config.yaml"

Check warning on line 1 in docs/advanced_sample_inventory/group_vars/rke2_servers.yaml

View workflow job for this annotation

GitHub Actions / Lint for push

1:1 [document-start] missing document start "---"

Check warning on line 1 in docs/advanced_sample_inventory/group_vars/rke2_servers.yaml

View workflow job for this annotation

GitHub Actions / Lint for push

1:121 [line-length] line too long (138 > 120 characters)
rke2_audit_policy_config_file_path: "{{ playbook_dir }}/docs/advanced_sample_inventory/files/audit-policy.yaml"
rke2_manifest_config_directory: "{{ playbook_dir }}/docs/advanced_sample_inventory/pre-deploy-manifests/"
rke2_manifest_config_post_run_directory: "{{ playbook_dir }}/docs/advanced_sample_inventory/post-deploy-manifests/"

group_rke2_config:
# Use Cilium as the CNI
cni:
- cilium
# Cilium will replace this
disable-kube-proxy: true
profile: cis

Check failure on line 12 in docs/advanced_sample_inventory/group_vars/rke2_servers.yaml

View workflow job for this annotation

GitHub Actions / Lint for push

12:15 [trailing-spaces] trailing spaces
pod-security-admission-config-file: /etc/rancher/rke2/pod-security-admission-config.yaml

Check failure on line 13 in docs/advanced_sample_inventory/group_vars/rke2_servers.yaml

View workflow job for this annotation

GitHub Actions / Lint for push

13:91 [trailing-spaces] trailing spaces
audit-policy-file: /etc/rancher/rke2/audit-policy.yaml
kube-apiserver-arg:
- audit-policy-file=/etc/rancher/rke2/audit-policy.yaml
- audit-log-path=/var/lib/rancher/rke2/server/logs/audit.log

Check failure on line 17 in docs/advanced_sample_inventory/group_vars/rke2_servers.yaml

View workflow job for this annotation

GitHub Actions / Lint for push

17:65 [new-line-at-end-of-file] no new line character at the end of file
9 changes: 9 additions & 0 deletions docs/advanced_sample_inventory/hosts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
rke2_cluster:
children:
rke2_servers:
hosts:
server0.example.com:
rke2_agents:
hosts:
agent0.example.com:
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: helm.cattle.io/v1

Check warning on line 1 in docs/advanced_sample_inventory/post-deploy-manifests/cert-manager.yaml

View workflow job for this annotation

GitHub Actions / Lint for push

1:1 [document-start] missing document start "---"
kind: HelmChart
metadata:
name: jetstack
namespace: kube-system
spec:
repo: https://charts.jetstack.io
chart: cert-manager
version: v1.16.2
targetNamespace: cert-manager
createNamespace: true
valuesContent: |-
crds:
enabled: true
17 changes: 17 additions & 0 deletions docs/advanced_sample_inventory/pre-deploy-manifests/cilium.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
name: rke2-cilium
namespace: kube-system
spec:
valuesContent: |-
kubeProxyReplacement: true
k8sServiceHost: 127.0.0.1
k8sServicePort: 6443
bpf:
masquerade: true
preallocateMaps: true
tproxy: true
bpfClockProbe: true

Check failure on line 17 in docs/advanced_sample_inventory/pre-deploy-manifests/cilium.yaml

View workflow job for this annotation

GitHub Actions / Lint for push

17:1 [empty-lines] too many blank lines (1 > 0)
9 changes: 9 additions & 0 deletions docs/basic_sample_inventorysample/hosts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
rke2_cluster:
children:
rke2_servers:
hosts:
server0.example.com:
rke2_agents:
hosts:
agent0.example.com:
5 changes: 5 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This playbook requires ansible.utils to run properly. Please see https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-a-collection-from-galaxy for more information about how to install this.

```
ansible-galaxy collection install -r requirements.yml
```
File renamed without changes.
File renamed without changes.
Empty file added docs/tarball_install.md
Empty file.
Loading

0 comments on commit 6aa4f43

Please sign in to comment.