Skip to content

Commit ba07754

Browse files
authored
Merge pull request #279 from mjura/docker-consolidation
Documentation consolidation for Docker Kubeadm/RKE2
2 parents 3ed1203 + 0ffed79 commit ba07754

File tree

2 files changed

+7
-118
lines changed

2 files changed

+7
-118
lines changed

docs/next/modules/en/pages/user/clusterclass.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Docker::
8080
+
8181
To prepare the management Cluster, we are going to install the Docker Cluster API Provider.
8282
+
83-
* Provider installation
83+
* Infrastructure Docker provider installation
8484
+
8585
[source,yaml]
8686
----
@@ -98,7 +98,7 @@ spec:
9898
type: infrastructure
9999
----
100100
+
101-
* Boostrap and control plane setup
101+
* https://github.com/rancher/cluster-api-provider-rke2[Bootstrap/Control Plane provider for RKE2](installed by default) or https://github.com/kubernetes-sigs/cluster-api[Bootstrap/Control Plane provider for Kubeadm], example of Kubeadm installation:
102102
+
103103
[source,yaml]
104104
----
@@ -267,7 +267,7 @@ Docker Kubeadm::
267267
kubectl apply -f https://raw.githubusercontent.com/rancher/turtles/refs/heads/main/examples/clusterclasses/docker/clusterclass-docker-kubeadm.yaml
268268
----
269269
+
270-
* For this example we are also going to install Calico as the default CNI. +
270+
* For this example we are also going to install Calico as the default CNI.
271271
+
272272
We can do this automatically at Cluster creation using the https://rancher-sandbox.github.io/cluster-api-addon-provider-fleet/[Cluster API Add-on Provider Fleet]. +
273273
This Add-on provider is installed by default with {product_name}. +
@@ -320,7 +320,7 @@ Docker RKE2::
320320
kubectl apply -f https://raw.githubusercontent.com/rancher/turtles/refs/heads/main/examples/clusterclasses/docker/clusterclass-docker-rke2.yaml
321321
----
322322
+
323-
* For this example we are also going to install Calico as the default CNI. +
323+
* For this example we are also going to install Calico as the default CNI.
324324
+
325325
We can do this automatically at Cluster creation using the https://rancher-sandbox.github.io/cluster-api-addon-provider-fleet/[Cluster API Add-on Provider Fleet]. +
326326
This Add-on provider is installed by default with {product_name}. +

docs/next/modules/en/pages/user/clusters.adoc

+3-114
Original file line numberDiff line numberDiff line change
@@ -118,61 +118,7 @@ spec:
118118
119119
Docker RKE2/Kubeadm::
120120
+
121-
* Rancher Manager cluster with {product_name} installed
122-
* Cluster API Providers: you can find a guide on how to install a provider using the `CAPIProvider` resource xref:../operator/capiprovider.adoc[here]
123-
** https://github.com/kubernetes-sigs/cluster-api[Infrastructure provider for Docker], example of Docker provider installation:
124-
+
125-
[source,yaml]
126-
----
127-
---
128-
apiVersion: v1
129-
kind: Namespace
130-
metadata:
131-
name: capd-system
132-
---
133-
apiVersion: turtles-capi.cattle.io/v1alpha1
134-
kind: CAPIProvider
135-
metadata:
136-
name: docker
137-
namespace: capd-system
138-
spec:
139-
type: infrastructure
140-
----
141-
+
142-
** https://github.com/rancher/cluster-api-provider-rke2[Bootstrap/Control Plane provider for RKE2](installed by default) or https://github.com/kubernetes-sigs/cluster-api[Bootstrap/Control Plane provider for Kubeadm], example
143-
of Kubeadm installation:
144-
+
145-
[source,yaml]
146-
----
147-
---
148-
apiVersion: v1
149-
kind: Namespace
150-
metadata:
151-
name: capi-kubeadm-bootstrap-system
152-
---
153-
apiVersion: turtles-capi.cattle.io/v1alpha1
154-
kind: CAPIProvider
155-
metadata:
156-
name: kubeadm-bootstrap
157-
namespace: capi-kubeadm-bootstrap-system
158-
spec:
159-
name: kubeadm
160-
type: bootstrap
161-
---
162-
apiVersion: v1
163-
kind: Namespace
164-
metadata:
165-
name: capi-kubeadm-control-plane-system
166-
---
167-
apiVersion: turtles-capi.cattle.io/v1alpha1
168-
kind: CAPIProvider
169-
metadata:
170-
name: kubeadm-control-plane
171-
namespace: capi-kubeadm-control-plane-system
172-
spec:
173-
name: kubeadm
174-
type: controlPlane
175-
----
121+
* Following installation guide was moved here xref:../user/clusterclass.adoc[here]
176122
177123
vSphere RKE2/Kubeadm::
178124
+
@@ -333,68 +279,11 @@ kubectl create -f cluster1.yaml
333279
334280
Docker RKE2::
335281
+
336-
To generate the YAML for the cluster, do the following:
337-
+
338-
. Open a terminal and run the following:
339-
+
340-
[source,bash,subs=attributes+]
341-
----
342-
export CLUSTER_NAME={cluster-name}
343-
export NAMESPACE={namespace}
344-
export CONTROL_PLANE_MACHINE_COUNT={control-plane-machine-count}
345-
export WORKER_MACHINE_COUNT={worker-machine-count}
346-
export RKE2_VERSION={kubernetes-version}+rke2r1
347-
export RKE2_CNI=calico
348-
export KUBERNETES_VERSION={kubernetes-version} # needed for the CAPI Docker provider to use proper image
349-
350-
curl -s https://raw.githubusercontent.com/rancher/turtles/refs/heads/main/test/e2e/data/cluster-templates/docker-rke2.yaml -o docker-rke2.yaml
351-
envsubst '${NAMESPACE} $\{CLUSTER_NAME} $\{WORKER_MACHINE_COUNT} $\{RKE2_VERSION} $\{RKE2_CNI} $\{CONTROL_PLANE_MACHINE_COUNT} $\{KUBERNETES_VERSION}' < template-docker-rke2.yaml > cluster1.yaml
352-
----
353-
+
354-
. View **cluster1.yaml** to ensure there are no tokens. You can make any changes you want as well.
355-
+
356-
> The Cluster API quickstart guide contains more detail. Read the steps related to this section https://cluster-api.sigs.k8s.io/user/quick-start.html#required-configuration-for-common-providers[here].
357-
358-
. Create the cluster using kubectl
359-
+
360-
[source,bash]
361-
----
362-
kubectl create namespace ${NAMESPACE}
363-
kubectl create -f cluster1.yaml
364-
----
282+
* Following installation guide was moved here xref:../user/clusterclass.adoc[here]
365283
366284
Docker Kubeadm::
367285
+
368-
To generate the YAML for the cluster, do the following:
369-
+
370-
. Open a terminal and run the following:
371-
+
372-
[source,bash,subs=attributes+]
373-
----
374-
export CLUSTER_NAME={cluster-name}
375-
export NAMESPACE={namespace}
376-
export CONTROL_PLANE_MACHINE_COUNT={control-plane-machine-count}
377-
export WORKER_MACHINE_COUNT={worker-machine-count}
378-
export KUBERNETES_VERSION={kubernetes-version}
379-
380-
curl -s https://raw.githubusercontent.com/rancher/turtles/refs/heads/main/test/e2e/data/cluster-templates/docker-kubeadm.yaml | envsubst > cluster1.yaml
381-
----
382-
+
383-
. View **cluster1.yaml** to ensure there are no tokens. You can make any changes you want as well.
384-
+
385-
> The Cluster API quickstart guide contains more detail. Read the steps related to this section https://cluster-api.sigs.k8s.io/user/quick-start.html#required-configuration-for-common-providers[here].
386-
387-
. Create the cluster using kubectl
388-
+
389-
[source,bash]
390-
----
391-
kubectl create namespace ${NAMESPACE}
392-
kubectl create -f cluster1.yaml
393-
----
394-
+
395-
. Deploy CNI
396-
+
397-
> Once cluster is created a CNI is required for Nodes to become ready. You can refer to Cluster API documentation for example CNI installation https://cluster-api.sigs.k8s.io/user/quick-start#deploy-a-cni-solution[here].
286+
* Following installation guide was moved here xref:../user/clusterclass.adoc[here]
398287
399288
vSphere RKE2::
400289
+

0 commit comments

Comments
 (0)