-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to register a cluster with one command
The sveltosctl register command is used to register a cluster. It requires a Kubeconfig to be passed. If user has a kubeconfig with multiple contexts, the option __fleet-cluster-context__ allows to specify the context for the cluster to be managed. So with default context pointing to the management cluster, following command will: 1. create a ServiceAccount in the managed cluster (using cluster-1 context) 2. grant this ServiceAccount cluster-admin permission 3. create a TokenRequest for such account and a Kubeconfig with bearer token from the TokenRequest 4. create a SveltosCluster in the management cluster (so using default context) and a Secret with kubeconfig generated in the step above ``` sveltosctl register cluster --namespace=gcp --cluster=cluster-1 --fleet-cluster-context=cluster-1 --labels=k1=v1,k2=v2 ```
- Loading branch information
mgianluc
committed
Apr 17, 2024
1 parent
5aabffb
commit 30b3c1e
Showing
7 changed files
with
183 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.