Skip to content

Commit

Permalink
Merge pull request #1246 from RainbowMango/pr_improve_register_doc
Browse files Browse the repository at this point in the history
Improve register document
  • Loading branch information
karmada-bot authored Jan 13, 2022
2 parents 9167f9b + 48bbe9a commit bc15b3d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docs/userguide/cluster-registration.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,22 @@ kubectl karmada join member1 --kubeconfig=<karmada kubeconfig> --cluster-kubecon
```
Repeat this step to join any additional clusters.

The `--kubeconfig` specifies the Karmada's `kubeconfig` file and the `--cluster-kubeconfig` specifies the registering cluster's `kubeconfig` file.
The `--kubeconfig` specifies the Karmada's `kubeconfig` file and the CLI infers `karmada-apiserver` context
from the `current-context` field of the `kubeconfig`. If there are more than one context is configured in
the `kubeconfig` file, it is recommended to specify the context by the `--karmada-context` flag. For example:
```
kubectl karmada join member1 --kubeconfig=<karmada kubeconfig> --karmada-context=karmada --cluster-context=member1
```

The `--cluster-kubeconfig` specifies the member cluster's `kubeconfig` and the CLI infers the member cluster's context
by the cluster name. If there is more than one context is configured in the `kubeconfig` file, or you don't want to use
the context name to register, it is recommended to specify the context by the `--cluster-context` flag. For example:

Maybe you have to specify the context if there are more than one contexts in `kubeconfig` file:
```
kubectl karmada join member1 --kubeconfig=<karmada kubeconfig> --karmada-context=karmada \
--cluster-kubeconfig=<member1 kubeconfig> --cluster-context=member1
```
> Note: The registering cluster name can be different from the context with `--cluster-context` specified.
### Check cluster status

Expand Down

0 comments on commit bc15b3d

Please sign in to comment.