From 2146bfd2b6a845f8b992ad046aef389047f82ee7 Mon Sep 17 00:00:00 2001 From: killianmuldoon Date: Tue, 5 Oct 2021 11:38:32 +0100 Subject: [PATCH] updated wording, spacing, quotations marks and naming --- .../experimental-features/cluster-classes.md | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/docs/book/src/tasks/experimental-features/cluster-classes.md b/docs/book/src/tasks/experimental-features/cluster-classes.md index a535304d52d8..36fa32dfb613 100644 --- a/docs/book/src/tasks/experimental-features/cluster-classes.md +++ b/docs/book/src/tasks/experimental-features/cluster-classes.md @@ -9,7 +9,7 @@ This tutorial covers using Cluster API and ClusterClass to create a Kubernetes c

Note

-This guide covers creating a ClusterClass cluster with the CAPD provider. +This guide only covers creating a ClusterClass cluster with the CAPD provider. ## Installation @@ -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 @@ -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: @@ -197,7 +195,7 @@ 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: @@ -205,7 +203,7 @@ To create the resources run: 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. @@ -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 ``` @@ -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. @@ -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