Skip to content

Commit

Permalink
updated wording, spacing, quotations marks and naming
Browse files Browse the repository at this point in the history
  • Loading branch information
killianmuldoon committed Oct 5, 2021
1 parent 0258a82 commit 2146bfd
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions docs/book/src/tasks/experimental-features/cluster-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This tutorial covers using Cluster API and ClusterClass to create a Kubernetes c

<h1>Note</h1>

This guide covers creating a ClusterClass cluster with the CAPD provider.
This guide only covers creating a ClusterClass cluster with the CAPD provider.
</aside>

## Installation
Expand All @@ -22,14 +22,12 @@ This guide requires the following tools are installed:
- Install and setup [kubectl] and [clusterctl]
- Install [Kind] and [Docker]

For more information see the [quick start guide].

#### Enable experimental features

ClusterClass is currently behind a feature gate that needs to be enabled.
This tutorial will also use another experimental gated feature - Cluster Resource Set - in this tutorial. This is not required for ClusterClass but is used in this tutorial to set up networking.

To enable these features set the respective environmental variables by running:
To enable these features set the respective environment variables by running:
```bash
export EXP_CLUSTER_RESOURCE_SET=true
export CLUSTER_TOPOLOGY=true
Expand All @@ -54,10 +52,10 @@ clusterctl init --infrastructure docker
With a management Cluster with CAPD and Cluster Topology the ClusterClass and other templates needed to stamp clusters can be created.

The below contains six yaml objects which are used to define the cluster:
*ClusterClass
* ClusterClass
* For the InfrastructureCluster:
* DockerClusterTemplate
* For the Control Plane:
* For the ControlPlane:
* KubeadmControlPlaneTemplate
* DockerMachineTemplate
* For the worker nodes:
Expand Down Expand Up @@ -197,15 +195,15 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/cluster-api/m
#### Enable networking for workload clusters
To make sure workload clusters come up with a functioning network a Kindnet ConfigMap with a Kindnet ClusterResourceSet is required. Kindnet only offers networking for Clusters built with Kind and CAPD. This can be substituted for any other networking solution for Kubernetes e.g. Calico as used in the Quickstart guide.
`
The kindnet configuration file can be found in the [CAPI repo](https://raw.githubusercontent.com/kubernetes-sigs/cluster-api/main/test/infrastructure/docker/examples/kindnet-clusterresourceset.yaml).
To create the resources run:
```bash
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/cluster-api/main/test/infrastructure/docker/examples/kindnet-clusterresourceset.yaml
```
#### Apply the workload cluster
#### Create the workload cluster
The below is a Cluster definition that leverages the ClusterClass created above to define its shape.
Expand Down Expand Up @@ -266,7 +264,7 @@ The output should be similar to:
```bash
NAME INITIALIZED API SERVER AVAILABLE VERSION REPLICAS READY UPDATED UNAVAILABLE
capi-quickstart true v1.21.2 1 1 1
clusterclass-quickstart true v1.21.2 1 1 1
```
Expand All @@ -278,21 +276,20 @@ Looking at the newly-created cluster, the version of the control plane and the m
```bash
> kubectl get kubeadmcontrolplane,machinedeployments
NAME CLUSTER INITIALIZED API SERVER AVAILABLE REPLICAS READY UPDATED UNAVAILABLE AGE VERSION
kubeadmcontrolplane.controlplane.cluster.x-k8s.io/capi-quickstart-XXXX capi-quickstart true true 1 1 1 0 2m21s v1.21.2
kubeadmcontrolplane.controlplane.cluster.x-k8s.io/clusterclass-quickstart-XXXX clusterclass-quickstart true true 1 1 1 0 2m21s v1.21.2
NAME CLUSTER REPLICAS READY UPDATED UNAVAILABLE PHASE AGE VERSION
machinedeployment.cluster.x-k8s.io/capi-quickstart-linux-workers-XXXX capi-quickstart 1 1 1 0 Running 2m21s v1.21.2
machinedeployment.cluster.x-k8s.io/clusterclass-quickstart-linux-workers-XXXX clusterclass-quickstart 1 1 1 0 Running 2m21s v1.21.2
```
To update the Cluster the only change needed is to the 'version' field under `spec.topology` in the Cluster object.
To update the Cluster the only change needed is to the `version` field under `spec.topology` in the Cluster object.
Change '1.21.2' to '1.22.0' as below.
Change `1.21.2` to `1.22.0` as below.
```bash
kubectl patch cluster capi-quickstart --type json --patch '[{"op": "replace", "path": "/spec/topology/version", "value": "v1.22.0"}]'
kubectl patch cluster clusterclass-quickstart --type json --patch '[{"op": "replace", "path": "/spec/topology/version", "value": "v1.22.0"}]'
```
The upgrade will take some time to roll out as it will take place machine by machine with older versions of the machines only being removed after healthy newer versions come online.
Expand All @@ -304,10 +301,10 @@ watch kubectl get kubeadmcontrolplane,machinedeployments
After a few minutes the upgrade will be complete and the output will be similar to:
```bash
NAME CLUSTER INITIALIZED API SERVER AVAILABLE REPLICAS READY UPDATED UNAVAILABLE AGE VERSION
kubeadmcontrolplane.controlplane.cluster.x-k8s.io/capi-quickstart-XXXX capi-quickstart true true 1 1 1 0 7m29s v1.22.0
kubeadmcontrolplane.controlplane.cluster.x-k8s.io/clusterclass-quickstart-XXXX clusterclass-quickstart true true 1 1 1 0 7m29s v1.22.0
NAME CLUSTER REPLICAS READY UPDATED UNAVAILABLE PHASE AGE VERSION
machinedeployment.cluster.x-k8s.io/capi-quickstart-linux-workers-XXXX capi-quickstart 1 1 1 0 Running 7m29s v1.22.0
machinedeployment.cluster.x-k8s.io/clusterclass-quickstart-linux-workers-XXXX clusterclass-quickstart 1 1 1 0 Running 7m29s v1.22.0
```
## Clean Up
Expand Down

0 comments on commit 2146bfd

Please sign in to comment.