Skip to content

Commit 5f45ae4

Browse files
Merge pull request #18 from itdove/quick_start
Quick-start
2 parents e513b4f + e2303c7 commit 5f45ae4

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

README.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,44 @@
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:
9+
#### From binaries:
10+
11+
The binaries for several platforms are available [here](https://github.com/open-cluster-management-io/clusteradm/releases).
12+
- Download the compressed file from [here](https://github.com/open-cluster-management-io/clusteradm/releases)
13+
- Uncompress the file and place the output in a directory of your $PATH
914

10-
## Installation
15+
#### From source:
1116

17+
Go 1.16 is required in order to build or contribute on this project as it leverage the `go:embed` tip.
1218
The binary will be installed in `$GOPATH/bin`
13-
### CLI
1419

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

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

0 commit comments

Comments
 (0)