Skip to content

Commit

Permalink
improve the clarity of the installation guide (#7)
Browse files Browse the repository at this point in the history
* improve the installation documentation

Signed-off-by: zsnmwy <[email protected]>
  • Loading branch information
zsnmwy authored Feb 16, 2022
1 parent 38d98a4 commit b40c554
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/clusternet-agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ kubeVersion: ""
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.0
version: 0.3.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
17 changes: 14 additions & 3 deletions charts/clusternet-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## TL;DR

```console
helm repo add clusternet https://clusternet.github.io/charts
helm install clusternet-agent -n clusternet-system --create-namespace \
$ helm repo add clusternet https://clusternet.github.io/charts
$ helm install clusternet-agent -n clusternet-system --create-namespace \
--set parentURL=PLEASE-CHANGE-ME \
--set registrationToken=PLEASE-CHANGE-ME \
clusternet/clusternet-agent
Expand All @@ -13,12 +13,23 @@ helm install clusternet-agent -n clusternet-system --create-namespace \
Please update `PLEASE-CHANGE-ME` to your valid configurations, such as,

```console
helm install clusternet-agent -n clusternet-system --create-namespace \
$ helm install clusternet-agent -n clusternet-system --create-namespace \
--set parentURL=https://192.168.10.10:6443 \
--set registrationToken=07401b.f395accd246ae52d \
clusternet/clusternet-agent
```

**Note:** If bootstrapping authentication is **not supported** by the kube-apiserver in parent cluster (like k3s) , i.e. `--enable-bootstrap-token-auth=false` (which defaults to be false), please use serviceaccount token instead.

[Click here to get the serviceaccount token from parent cluster.](../clusternet-hub/README.md#get-serviceaccount-token-from-parent-cluster)

```console
$ helm install clusternet-agent -n clusternet-system --create-namespace \
--set parentURL=https://192.168.10.10:6443 \
--set registrationToken=Parent-Cluster-ServiceAccount-Token \
clusternet/clusternet-agent
```

## Introduction

`clusternet-agent` is responsible for
Expand Down
2 changes: 1 addition & 1 deletion charts/clusternet-hub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ kubeVersion: ""
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.0
version: 0.3.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
27 changes: 24 additions & 3 deletions charts/clusternet-hub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,30 @@
## TL;DR

```console
helm repo add clusternet https://clusternet.github.io/charts
helm install clusternet-hub -n clusternet-system --create-namespace clusternet/clusternet-hub
kubectl apply -f https://raw.githubusercontent.com/clusternet/clusternet/main/manifests/samples/cluster_bootstrap_token.yaml
$ helm repo add clusternet https://clusternet.github.io/charts
$ helm install clusternet-hub -n clusternet-system --create-namespace clusternet/clusternet-hub
```

### Create Auth Token

- If bootstrapping authentication is supported, i.e. `--enable-bootstrap-token-auth=true` is explicitly set in the kube-apiserver running in parent cluster.

```console
$ kubectl apply -f https://raw.githubusercontent.com/clusternet/clusternet/main/manifests/samples/cluster_bootstrap_token.yaml
```

- If bootstrapping authentication is **not supported** by the kube-apiserver in parent cluster (like k3s) , i.e. `--enable-bootstrap-token-auth=false` (which defaults to be false), please use serviceaccount token instead.

```console
# this will create a serviceaccount token
$ kubectl apply -f https://raw.githubusercontent.com/clusternet/clusternet/main/manifests/samples/cluster_serviceaccount_token.yaml
```

### Get ServiceAccount Token from parent cluster

```console
$ kubectl get secret -n clusternet-system -o=jsonpath='{.items[?(@.metadata.annotations.kubernetes\.io/service-account\.name=="cluster-bootstrap-use")].data.token}' | base64 --decode; echo
HERE WILL OUTPUTS A LONG STRING. PLEASE REMEMBER THIS.
```

## Introduction
Expand Down

0 comments on commit b40c554

Please sign in to comment.