Merge pull request #1246 from RainbowMango/pr_improve_register_doc

Improve register document
This commit is contained in:
karmada-bot 2022-01-13 15:02:32 +08:00 committed by GitHub
commit bc15b3d484
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 2 deletions

View File

@ -47,13 +47,22 @@ kubectl karmada join member1 --kubeconfig=<karmada kubeconfig> --cluster-kubecon
``` ```
Repeat this step to join any additional clusters. 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 \ kubectl karmada join member1 --kubeconfig=<karmada kubeconfig> --karmada-context=karmada \
--cluster-kubeconfig=<member1 kubeconfig> --cluster-context=member1 --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 ### Check cluster status