-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f86d01
commit 8a7be52
Showing
6 changed files
with
145 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Kubeadm ClusterClass | ||
## Specification | ||
| Control Plane | CNI | OS | Installs ClusterClass | | ||
|---------------|--------|--------|-----------------------| | ||
| Kubeadm | Cilium | Ubuntu | Yes | | ||
## Prerequisites | ||
[Quickstart](../topics/getting-started.md) completed | ||
## Usage | ||
### Create clusterClass and first cluster | ||
1. Generate clusterClass & cluster manifests | ||
```bash | ||
clusterctl generate cluster test-cluster --flavor clusterclass-kubeadm > test-cluster.yaml | ||
``` | ||
2. Apply cluster manifests | ||
```bash | ||
kubectl apply -f test-cluster.yaml | ||
``` | ||
### Create second cluster | ||
1. Generate cluster manifests | ||
```bash | ||
clusterctl generate cluster test-cluster-2 --flavor clusterclass-kubeadm > test-cluster-2.yaml | ||
``` | ||
```yaml | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Cluster | ||
metadata: | ||
labels: | ||
ccm: linode | ||
cni: cilium | ||
crs: test-cluster-2-crs | ||
name: test-cluster-2 | ||
namespace: default | ||
spec: | ||
clusterNetwork: | ||
pods: | ||
cidrBlocks: | ||
- 192.168.128.0/17 | ||
topology: | ||
class: kubeadm | ||
controlPlane: | ||
replicas: 1 | ||
variables: | ||
- name: region | ||
value: us-ord | ||
- name: controlPlaneMachineType | ||
value: g6-standard-2 | ||
- name: workerMachineType | ||
value: g6-standard-2 | ||
version: v1.29.1 | ||
workers: | ||
machineDeployments: | ||
- class: default-worker | ||
name: md-0 | ||
replicas: 1 | ||
``` | ||
2. Apply cluster manifests | ||
```bash | ||
kubectl apply -f test-cluster-2.yaml | ||
``` |
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,16 @@ | ||
# Default | ||
## Specification | ||
| Control Plane | CNI | OS | Installs ClusterClass | | ||
|---------------|--------|--------|-----------------------| | ||
| Kubeadm | Cilium | Ubuntu | No | | ||
## Prerequisites | ||
[Quickstart](../topics/getting-started.md) completed | ||
## Usage | ||
1. Generate cluster yaml | ||
```bash | ||
clusterctl generate cluster test-cluster --flavor clusterclass > test-cluster.yaml | ||
``` | ||
2. Apply cluster yaml | ||
```bash | ||
kubectl apply -f test-cluster.yaml | ||
``` |
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,20 @@ | ||
# Flavors | ||
|
||
In `clusterctl` the infrastructure provider authors can provide different types | ||
of cluster templates referred to as "flavors". You can use the `--flavor` flag | ||
to specify which flavor to use for a cluster, e.g: | ||
|
||
```bash | ||
clusterctl generate cluster test-cluster --flavor clusterclass | ||
``` | ||
|
||
To use the default flavor, omit the `--flavor` flag. | ||
|
||
See the [`clusterctl` flavors docs](https://cluster-api.sigs.k8s.io/clusterctl/commands/generate-cluster.html#flavors) for more information. | ||
|
||
|
||
## supported flavors | ||
|
||
- [Default](default.md) | ||
- [Cluster Class Kubeadm](clusterclass-kubeadm.md) | ||
- [k3s](k3s.md) |
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 @@ | ||
# K3s | ||
## Specification | ||
| Control Plane | CNI | OS | Installs ClusterClass | | ||
|-----------------------------|--------|--------|-----------------------| | ||
| [k3s](https://docs.k3s.io/) | Cilium | Ubuntu | No | | ||
## Prerequisites | ||
* [Quickstart](../topics/getting-started.md) completed | ||
* Select a [k3s kubernetes version](https://github.com/k3s-io/k3s/releases) to set for the kubernetes version | ||
```bash | ||
export KUBERNETES_VERSION=v1.29.1+k3s2 | ||
``` | ||
* Installed [k3s bootstrap provider](https://github.com/k3s-io/cluster-api-k3s) into your management cluster | ||
* Add `k3s-clusterctl.yaml` config for the k3s bootstrap/control plane providers | ||
```yaml | ||
providers: | ||
- name: "k3s" | ||
url: https://github.com/k3s-io/cluster-api-k3s/releases/latest/bootstrap-components.yaml | ||
type: "BootstrapProvider" | ||
- name: "k3s" | ||
url: https://github.com/k3s-io/cluster-api-k3s/releases/latest/control-plane-components.yaml | ||
``` | ||
* Install the k3s provider into your management cluster | ||
```shell | ||
clusterctl init --bootstrap k3s --control-plane k3s --config k3s-clusterctl.yaml | ||
``` | ||
## Usage | ||
1. Generate cluster yaml | ||
```bash | ||
clusterctl generate cluster test-cluster --kubernetes-version ${K3S_KUBERNETES_VERSION} --flavor k3s > test-k3s-cluster.yaml | ||
``` | ||
2. Apply cluster yaml | ||
```bash | ||
kubectl apply -f test-k3s-cluster.yaml | ||
``` |
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