ks
ks copied to clipboard
Add a command to setup KubeSphere
case 1
Sometimes we need multiple environments for development and testing purposes. It's hard to memorize the address of those KubeSphere clusters. Even worse, part of those environments might be temporary. Give that, it would be good to have a simple way to set up a remote kubeclt
connection locally, open the console of the KubeSphere cluster.
You can consider the following usage:
ks config add --cluster dev --host 192.168.0.3
The above command will get the token of the default serviceAccount, then add it to ~/.kube/config
as dev
. Secondly, create a configMap to store the address of the cluster. It could be like:
kind: ConfigMap
apiVersion: v1
data:
externalAddress: http://192.168.0.3:30880
If you want to open it in your browser, just need to type: ks open dev
.
/help
@LinuxSuRen: This request has been marked as needing help from a contributor.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help
command.
In response to this:
/help
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository.