KubeFATE CLI is a CLI tool that connects KubeFATE service to deploy FATE on Kubernetes.
Before using kubefate
CLI, you need to deploy KubeFATE service.
Get the source code from GitHub:
git clone https://github.com/FederatedAI/KubeFATE.git
cd KubeFATE/k8s-deploy
Deploy KubeFATE service on Kubernetes:
kubectl apply -f ./rbac-config.yaml
kubectl apply -f ./kubefate.yaml
A more detailed deployment process is here(deploy KubeFATE in Kubernetes).
kubefate
CLI is developed by go and can run easily on Linux, Mac OS and Windows.
In addition to downloading and using the release package, it can also be compiled and installed on different platforms.
go build -o bin/kubefate kubefate.go
go build -o bin/kubefate kubefate.go
go build -o bin/kubefate.exe -buildmode=exe kubefate.go
Add ./bin
to the 'PATH' environment variable.
Configuration in current working directory config.yaml
file.
log:
level: info
user:
username: admin
password: admin
serviceurl: example.com
Use kubefate version
to verify that the installation is successful.
If you have successfully installed kubefate
CLI, you can use these commands.
The kubefate
command contains command actions and parameters.
Install a cluster
kubefate cluster install -f <cluster_config_yaml>
OPTIONS:
--file value, -f value Required, chart cluster.yaml
--cover If the cluster already exists, overwrite the installation (default: false)
--help, -h show help (default: false)
If it runs successfully, a job_UUID will be returned. The cluster installation status can be obtained according to the job_UUID.
<cluster_config_yaml>
means cluster.yaml
cluster- spart.yaml
cluster- serving.yaml
and so on.
Note that although this command can return a job UUID, it doesn't mean that the job runs successfully.
Update a cluster
kubefate cluster update -f <cluster_config_yaml>
OPTIONS:
--file value, -f value Required, chart cluster.yaml
--help, -h show help (default: false)
If it runs successfully, a job_UUID will be returned. According to the job_UUID, the cluster update status can be obtained.
Delete a cluster
kubefate cluster delete <cluster_uuid>
If it runs successfully, a job_UUID will be returned. According to the job_UUID, the cluster deletion status can be obtained.
Get the list of currently running clusters.
kubefate cluster list
OPTIONS:
--all, -A List all clusters including deleted ones (default: false)
--help, -h show help (default: false)
Get the description information of the given cluster.
kubefate cluster describe <cluster_uuid>
Gets the component log for a given cluster. (If no component is specified, all logs will be obtained.)
kubefate cluster logs <cluster_uuid> [component]
OPTIONS:
--follow, -f Specify if the logs should be streamed. (default: false)
--previous If true, print the logs for the previous instance of the container in a pod if it exists. (defau
lt: false)
--since value Only return logs newer than a relative duration like 5s, 2m, or 3h. Defaults to all logs. Only o
ne of since-time since may be used. (default: 0s)
--since-time value Only return logs after a specific date (RFC3339). Defaults to all logs. Only one of since-time s
ince may be used. (default: (*time.Time)(nil))
--timestamps Include timestamps on each line in the log output. (default: false)
--tail value Lines of recent log file to display. Defaults to -1 with no selector, showing all log lines othe
rwise 10, if a selector is provided. (default: -1)
--limit-bytes value Maximum bytes of logs to return. Defaults to no limit. (default: 0)
--help, -h show help (default: false)
Through the install, update and delete of the cluster, the corresponding jobs will be generated.
Get the list of all jobs
kubefate job list
Cancel the Running job
kubefate job stop <job_uuid>
This only works for Running jobs of type ClusterInstall
Get the description information of the given job
kubefate job describe <job_uuid>
Delete the record of the given job
kubefate job delete <job_uuid>
Chart is the management of the chart needed to install cluster.
Upload chart file to KubeFATE service. The chart file must be generated by the helm package
kubefate chart upload -f <chart_file>
Get the chart list of existing KubeFATE services.
kubefate chart list
Delete chart file from KubeFATE service.
kubefate chart delete <chart_uuid>
Get the namespace list of Kubernetes.
kubefate namespace list
Get the user list of KubeFATE service.
kubefate user list
Obtain the specific user description information of KubeFATE service.
kubefate user describe <user_uuid>
View the corresponding version of KubeFATE service of the current CLI and connection.
kubefate version
Get CLI help.
kubefate help
All commands supports adding --help
to show help information.
If you have any questions with regarding to KubeFATE CLI, you can get help through creating an issue here.