Skip to content

Commit 23bd6bc

Browse files
committed
Quick-start
Signed-off-by: Dominique Vernier <[email protected]>
1 parent e513b4f commit 23bd6bc

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

README.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,46 @@
33

44
A CLI and kubernetes CLI plugin that allows you to interact with open-cluster-management to manage your Hybrid Cloud presence from the command-line.
55

6-
## Requirements
6+
## Quick start
77

8-
Go 1.16 is required in order to build or contribute on this project as it leverage the `go:embed` tip.
8+
### Install the clusteradm command-line:
99

10-
## Installation
10+
From binaries:
1111

12-
The binary will be installed in `$GOPATH/bin`
13-
### CLI
12+
The binaries for several platforms are available [here](https://github.com/open-cluster-management-io/clusteradm/releases).
13+
14+
- Download the compressed file from [here](https://github.com/open-cluster-management-io/clusteradm/releases)
15+
- Uncompress the file and place the output in a directory of your $PATH
16+
17+
From source:
18+
19+
Go 1.16 is required in order to build or contribute on this project as it leverage the `go:embed` tip.
20+
The binary will be installed in `$GOPATH/bin`
1421

1522
```bash
1623
git clone https://github.com/open-cluster-management-io/clusteradm.git
1724
cd clusteradm
1825
make build
1926
clusteradm
2027
```
28+
### Initialize a hub and join a cluster
29+
30+
```bash
31+
# Initialize the hub
32+
kubectl config use-context <hub cluster context> # kubectl config use-context kind-hub
33+
clusteradm init
34+
35+
# Request a managed cluster to join the hub
36+
kubectl config use-context <managed cluster context> # kubectl config use-context kind-managed-cluster
37+
clusteradm join --hub-token <token> --hub-apiserver <api server url> --cluster-name <cluster name>
38+
39+
# Accept the managed cluster request on the hub
40+
kubectl config use-context <hub cluster context> # kubectl config use-context kind-hub
41+
clusteradm accept --clusters <list of clusters> # clusteradm accept --clusters c1,c2,...
42+
```
43+
44+
After each above clusteradm command, the clusteradm will print out the next clusteradm command to execute which can be copy/paste.
45+
2146
## Contributing
2247

2348
See our [Contributing Document](CONTRIBUTING.md) for more information.

0 commit comments

Comments
 (0)