Skip to content

docs: add a note about the default clusterclass and how to get it #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ example), run:
make SKIP_BUILD=true dev.run-on-kind
```

Download the clusterclass quick start template:

```shell
wget https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/clusterclass-quick-start.yaml
kubectl apply -f clusterclass-quick-start.yaml
```

Comment on lines +26 to +32
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clusterctl generate command below actually creates this ClusterClass so unless you want to create it manually for other reasons this step is unnecessary.

$ clusterctl generate cluster capi-quickstart --flavor development --kubernetes-version v1.27.2 --control-plane-machine-count=1 --worker-machine-count=1 | gojq --yaml-input --yaml-output '. | select(.kind=="ClusterClass")'

apiVersion: cluster.x-k8s.io/v1beta1
kind: ClusterClass
metadata:
  name: quick-start
  namespace: default
<SNIP>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see what the problem is, the kubectl label messes up the YAML. Tested the following and it works - I'll push a new commit with this change to this PR (can always revert if you prefer to keep it this way):

clusterctl generate cluster capi-quickstart \
    --flavor development \
    --kubernetes-version v1.27.2 \
    --control-plane-machine-count=1 \
    --worker-machine-count=1 | \
  gojq --yaml-input --yaml-output \
    '. | (select(.kind=="Cluster").metadata.labels["capiext.labs.d2iq.io/cni"]|="calico")' | \
  kubectl apply --server-side -f -

Copy link
Member

@jimmidyson jimmidyson Aug 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thoughts, I'm going to merge #107 and could you test again please? I think that should have everything you need to get going without this change.

To create a cluster with [clusterctl](https://cluster-api.sigs.k8s.io/user/quick-start.html), run:

```shell
Expand Down