Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons
Submodule addons updated 1141 files
15 changes: 0 additions & 15 deletions docs/user_docs/cli/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,11 @@ Cluster command.
* [kbcli cluster configure](kbcli_cluster_configure.md) - Configure parameters with the specified components in the cluster.
* [kbcli cluster connect](kbcli_cluster_connect.md) - Connect to a cluster or instance.
* [kbcli cluster create](kbcli_cluster_create.md) - Create a cluster.
* [kbcli cluster create-account](kbcli_cluster_create-account.md) - Create account for a cluster
* [kbcli cluster custom-ops](kbcli_cluster_custom-ops.md) -
* [kbcli cluster delete](kbcli_cluster_delete.md) - Delete clusters.
* [kbcli cluster delete-account](kbcli_cluster_delete-account.md) - Delete account for a cluster
* [kbcli cluster delete-backup](kbcli_cluster_delete-backup.md) - Delete a backup.
* [kbcli cluster delete-ops](kbcli_cluster_delete-ops.md) - Delete an OpsRequest.
* [kbcli cluster describe](kbcli_cluster_describe.md) - Show details of a specific cluster.
* [kbcli cluster describe-account](kbcli_cluster_describe-account.md) - Describe account roles and related information
* [kbcli cluster describe-backup](kbcli_cluster_describe-backup.md) - Describe a backup.
* [kbcli cluster describe-backup-policy](kbcli_cluster_describe-backup-policy.md) - Describe backup policy
* [kbcli cluster describe-config](kbcli_cluster_describe-config.md) - Show details of a specific reconfiguring.
Expand All @@ -56,11 +53,9 @@ Cluster command.
* [kbcli cluster edit-config](kbcli_cluster_edit-config.md) - Edit the config file of the component.
* [kbcli cluster explain-config](kbcli_cluster_explain-config.md) - List the constraint for supported configuration params.
* [kbcli cluster expose](kbcli_cluster_expose.md) - Expose a cluster with a new endpoint, the new endpoint can be found by executing 'kbcli cluster describe NAME'.
* [kbcli cluster grant-role](kbcli_cluster_grant-role.md) - Grant role to account
* [kbcli cluster hscale](kbcli_cluster_hscale.md) - Horizontally scale the specified components in the cluster.
* [kbcli cluster label](kbcli_cluster_label.md) - Update the labels on cluster
* [kbcli cluster list](kbcli_cluster_list.md) - List clusters.
* [kbcli cluster list-accounts](kbcli_cluster_list-accounts.md) - List accounts for a cluster
* [kbcli cluster list-backup-policy](kbcli_cluster_list-backup-policy.md) - List backups policies.
* [kbcli cluster list-backups](kbcli_cluster_list-backups.md) - List backups.
* [kbcli cluster list-components](kbcli_cluster_list-components.md) - List cluster components.
Expand All @@ -74,7 +69,6 @@ Cluster command.
* [kbcli cluster register](kbcli_cluster_register.md) - Pull the cluster chart to the local cache and register the type to 'create' sub-command
* [kbcli cluster restart](kbcli_cluster_restart.md) - Restart the specified components in the cluster.
* [kbcli cluster restore](kbcli_cluster_restore.md) - Restore a new cluster from backup.
* [kbcli cluster revoke-role](kbcli_cluster_revoke-role.md) - Revoke role from account
* [kbcli cluster start](kbcli_cluster_start.md) - Start the cluster if cluster is stopped.
* [kbcli cluster stop](kbcli_cluster_stop.md) - Stop the cluster and release all the pods of the cluster.
* [kbcli cluster update](kbcli_cluster_update.md) - Update the cluster settings, such as enable or disable monitor or log.
Expand All @@ -93,15 +87,6 @@ ClusterDefinition command.
* [kbcli clusterdefinition list-service-reference](kbcli_clusterdefinition_list-service-reference.md) - List cluster references declared in a cluster definition.


## [clusterversion](kbcli_clusterversion.md)

ClusterVersion command.

* [kbcli clusterversion list](kbcli_clusterversion_list.md) - List ClusterVersions.
* [kbcli clusterversion set-default](kbcli_clusterversion_set-default.md) - Set the clusterversion to the default clusterversion for its clusterdefinition.
* [kbcli clusterversion unset-default](kbcli_clusterversion_unset-default.md) - Unset the clusterversion if it's default.


## [dashboard](kbcli_dashboard.md)

List and open the KubeBlocks dashboards.
Expand Down
1 change: 0 additions & 1 deletion docs/user_docs/cli/kbcli.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ kbcli [flags]
* [kbcli backuprepo](kbcli_backuprepo.md) - BackupRepo command.
* [kbcli cluster](kbcli_cluster.md) - Cluster command.
* [kbcli clusterdefinition](kbcli_clusterdefinition.md) - ClusterDefinition command.
* [kbcli clusterversion](kbcli_clusterversion.md) - ClusterVersion command.
* [kbcli dashboard](kbcli_dashboard.md) - List and open the KubeBlocks dashboards.
* [kbcli dataprotection](kbcli_dataprotection.md) - Data protection command.
* [kbcli kubeblocks](kbcli_kubeblocks.md) - KubeBlocks operation commands.
Expand Down
21 changes: 6 additions & 15 deletions docs/user_docs/cli/kbcli_addon_search.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,14 @@ kbcli addon search [flags]
### Examples

```
# install an addon from default index
kbcli addon install apecloud-mysql
# search the addons of all index
kbcli addon search

# install an addon from default index and skip KubeBlocks version compatibility check
kbcli addon install apecloud-mysql --force
# search the addons from a specified local path
kbcli addon search --path /path/to/local/chart

# install an addon from a specified index
kbcli addon install apecloud-mysql --index my-index

# install an addon with a specified version default index
kbcli addon install apecloud-mysql --version 0.7.0

# install an addon with a specified version and cluster chart of different version.
kbcli addon install apecloud-mysql --version 0.7.0 --cluster-chart-version 0.7.1

# install an addon with a specified version and local path.
kbcli addon install apecloud-mysql --version 0.7.0 --path /path/to/local/chart
# search different versions and indexes of an addon
kbcli addon search apecloud-mysql
```

### Options
Expand Down
6 changes: 0 additions & 6 deletions docs/user_docs/cli/kbcli_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,11 @@ Cluster command.
* [kbcli cluster configure](kbcli_cluster_configure.md) - Configure parameters with the specified components in the cluster.
* [kbcli cluster connect](kbcli_cluster_connect.md) - Connect to a cluster or instance.
* [kbcli cluster create](kbcli_cluster_create.md) - Create a cluster.
* [kbcli cluster create-account](kbcli_cluster_create-account.md) - Create account for a cluster
* [kbcli cluster custom-ops](kbcli_cluster_custom-ops.md) -
* [kbcli cluster delete](kbcli_cluster_delete.md) - Delete clusters.
* [kbcli cluster delete-account](kbcli_cluster_delete-account.md) - Delete account for a cluster
* [kbcli cluster delete-backup](kbcli_cluster_delete-backup.md) - Delete a backup.
* [kbcli cluster delete-ops](kbcli_cluster_delete-ops.md) - Delete an OpsRequest.
* [kbcli cluster describe](kbcli_cluster_describe.md) - Show details of a specific cluster.
* [kbcli cluster describe-account](kbcli_cluster_describe-account.md) - Describe account roles and related information
* [kbcli cluster describe-backup](kbcli_cluster_describe-backup.md) - Describe a backup.
* [kbcli cluster describe-backup-policy](kbcli_cluster_describe-backup-policy.md) - Describe backup policy
* [kbcli cluster describe-config](kbcli_cluster_describe-config.md) - Show details of a specific reconfiguring.
Expand All @@ -59,11 +56,9 @@ Cluster command.
* [kbcli cluster edit-config](kbcli_cluster_edit-config.md) - Edit the config file of the component.
* [kbcli cluster explain-config](kbcli_cluster_explain-config.md) - List the constraint for supported configuration params.
* [kbcli cluster expose](kbcli_cluster_expose.md) - Expose a cluster with a new endpoint, the new endpoint can be found by executing 'kbcli cluster describe NAME'.
* [kbcli cluster grant-role](kbcli_cluster_grant-role.md) - Grant role to account
* [kbcli cluster hscale](kbcli_cluster_hscale.md) - Horizontally scale the specified components in the cluster.
* [kbcli cluster label](kbcli_cluster_label.md) - Update the labels on cluster
* [kbcli cluster list](kbcli_cluster_list.md) - List clusters.
* [kbcli cluster list-accounts](kbcli_cluster_list-accounts.md) - List accounts for a cluster
* [kbcli cluster list-backup-policy](kbcli_cluster_list-backup-policy.md) - List backups policies.
* [kbcli cluster list-backups](kbcli_cluster_list-backups.md) - List backups.
* [kbcli cluster list-components](kbcli_cluster_list-components.md) - List cluster components.
Expand All @@ -77,7 +72,6 @@ Cluster command.
* [kbcli cluster register](kbcli_cluster_register.md) - Pull the cluster chart to the local cache and register the type to 'create' sub-command
* [kbcli cluster restart](kbcli_cluster_restart.md) - Restart the specified components in the cluster.
* [kbcli cluster restore](kbcli_cluster_restore.md) - Restore a new cluster from backup.
* [kbcli cluster revoke-role](kbcli_cluster_revoke-role.md) - Revoke role from account
* [kbcli cluster start](kbcli_cluster_start.md) - Start the cluster if cluster is stopped.
* [kbcli cluster stop](kbcli_cluster_stop.md) - Stop the cluster and release all the pods of the cluster.
* [kbcli cluster update](kbcli_cluster_update.md) - Update the cluster settings, such as enable or disable monitor or log.
Expand Down
121 changes: 7 additions & 114 deletions docs/user_docs/cli/kbcli_cluster_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,127 +11,20 @@ kbcli cluster create [NAME] [flags]
### Examples

```
# Create a cluster with cluster definition apecloud-mysql and cluster version ac-mysql-8.0.30
kbcli cluster create mycluster --cluster-definition apecloud-mysql --cluster-version ac-mysql-8.0.30
# Create a postgresql
kbcli cluster create postgresql my-cluster

# --cluster-definition is required, if --cluster-version is not specified, pick the most recently created version
kbcli cluster create mycluster --cluster-definition apecloud-mysql
# Get the cluster yaml by dry-run
kbcli cluster create postgresql my-cluster --dry-run

# Output resource information in YAML format, without creation of resources.
kbcli cluster create mycluster --cluster-definition apecloud-mysql --dry-run -o yaml

# Output resource information in YAML format, the information will be sent to the server
# but the resources will not be actually created.
kbcli cluster create mycluster --cluster-definition apecloud-mysql --dry-run=server -o yaml

# Create a cluster and set termination policy DoNotTerminate that prevents the cluster from being deleted
kbcli cluster create mycluster --cluster-definition apecloud-mysql --termination-policy DoNotTerminate

# Delete resources such as statefulsets, deployments, services, pdb, but keep PVCs
# when deleting the cluster, use termination policy Halt
kbcli cluster create mycluster --cluster-definition apecloud-mysql --termination-policy Halt

# Delete resource such as statefulsets, deployments, services, pdb, and including
# PVCs when deleting the cluster, use termination policy Delete
kbcli cluster create mycluster --cluster-definition apecloud-mysql --termination-policy Delete

# Delete all resources including all snapshots and snapshot data when deleting
# the cluster, use termination policy WipeOut
kbcli cluster create mycluster --cluster-definition apecloud-mysql --termination-policy WipeOut

# Create a cluster and set cpu to 1 core, memory to 1Gi, storage size to 20Gi and replicas to 3
kbcli cluster create mycluster --cluster-definition apecloud-mysql --set cpu=1,memory=1Gi,storage=20Gi,replicas=3

# Create a cluster and set storageClass to csi-hostpath-sc, if storageClass is not specified,
# the default storage class will be used
kbcli cluster create mycluster --cluster-definition apecloud-mysql --set storageClass=csi-hostpath-sc

# Create a cluster with replicationSet workloadType and set switchPolicy to Noop
kbcli cluster create mycluster --cluster-definition postgresql --set switchPolicy=Noop

# Create a cluster with more than one component, use "--set type=component-name" to specify the component,
# if not specified, the main component will be used, run "kbcli cd list-components CLUSTER-DEFINITION-NAME"
# to show the components in the cluster definition
kbcli cluster create mycluster --cluster-definition redis --set type=redis,cpu=1 --set type=redis-sentinel,cpu=200m

# Create a cluster and use a URL to set cluster resource
kbcli cluster create mycluster --cluster-definition apecloud-mysql \
--set-file https://kubeblocks.io/yamls/apecloud-mysql.yaml

# Create a cluster and load cluster resource set from stdin
cat << EOF | kbcli cluster create mycluster --cluster-definition apecloud-mysql --set-file -
- name: my-test ...

# Create a cluster scattered by nodes
kbcli cluster create --cluster-definition apecloud-mysql --topology-keys kubernetes.io/hostname \
--pod-anti-affinity Required

# Create a cluster in specific labels nodes
kbcli cluster create --cluster-definition apecloud-mysql \
--node-labels '"topology.kubernetes.io/zone=us-east-1a","disktype=ssd,essd"'

# Create a Cluster with two tolerations
kbcli cluster create --cluster-definition apecloud-mysql --tolerations \ '"engineType=mongo:NoSchedule","diskType=ssd:NoSchedule"'

# Create a cluster, with each pod runs on their own dedicated node
kbcli cluster create --cluster-definition apecloud-mysql --tenancy=DedicatedNode

# Create a cluster with backup to restore data
kbcli cluster create --backup backup-default-mycluster-20230616190023

# Create a cluster with time to restore from point in time
kbcli cluster create --restore-to-time "Jun 16,2023 18:58:53 UTC+0800" --source-cluster mycluster

# Create a cluster with auto backup
kbcli cluster create --cluster-definition apecloud-mysql --backup-enabled

# Create a cluster with default component having multiple storage volumes
kbcli cluster create --cluster-definition oceanbase --pvc name=data-file,size=50Gi --pvc name=data-log,size=50Gi --pvc name=log,size=20Gi

# Create a cluster with specifying a component having multiple storage volumes
kbcli cluster create --cluster-definition pulsar --pvc type=bookies,name=ledgers,size=20Gi --pvc type=bookies,name=journal,size=20Gi

# Create a cluster with using a service reference to another KubeBlocks cluster
kbcli cluster create --cluster-definition pulsar --service-reference name=pulsarZookeeper,cluster=zookeeper,namespace=default
# Edit cluster yaml before creation.
kbcli cluster create mycluster --edit
```

### Options

```
--annotation stringArray Set annotations for cluster
--backup string Set a source backup to restore data
--backup-cron-expression string the cron expression for schedule, the timezone is in UTC. see https://en.wikipedia.org/wiki/Cron.
--backup-enabled Specify whether enabled automated backup
--backup-method string the backup method, view it by "kbcli cd describe <cluster-definition>", if not specified, the default backup method will be to take snapshots of the volume
--backup-repo-name string the backup repository name
--backup-retention-period string a time string ending with the 'd'|'D'|'h'|'H' character to describe how long the Backup should be retained (default "1d")
--backup-starting-deadline-minutes int the deadline in minutes for starting the backup job if it misses its scheduled time for any reason
--cluster-definition string Specify cluster definition, run "kbcli cd list" to show all available cluster definitions
--cluster-version string Specify cluster version, run "kbcli cv list" to show all available cluster versions, use the latest version if not specified
--cpu-oversell-ratio float Set oversell ratio of CPU, set to 10 means 10 times oversell (default 1)
--create-only-set Create components exclusively configured in 'set'
--disable-exporter Enable or disable monitoring (default true)
--dry-run string[="unchanged"] Must be "client", or "server". If with client strategy, only print the object that would be sent, and no data is actually sent. If with server strategy, submit the server-side request, but no data is persistent. (default "none")
--edit Edit the API resource before creating
--enable-all-logs Enable advanced application all log extraction, set to true will ignore enabledLogs of component level, default is false
-h, --help help for create
--label stringArray Set labels for cluster resources
--memory-oversell-ratio float Set oversell ratio of memory, set to 10 means 10 times oversell (default 1)
--node-labels stringToString Node label selector (default [])
-o, --output format Prints the output in the specified format. Allowed values: JSON and YAML (default yaml)
--pitr-enabled Specify whether enabled point in time recovery
--pod-anti-affinity string Pod anti-affinity type, one of: (Preferred, Required) (default "Preferred")
--pvc stringArray Set the cluster detail persistent volume claim, each '--pvc' corresponds to a component, and will override the simple configurations about storage by --set (e.g. --pvc type=mysql,name=data,mode=ReadWriteOnce,size=20Gi --pvc type=mysql,name=log,mode=ReadWriteOnce,size=1Gi)
--rbac-enabled Specify whether rbac resources will be created by kbcli, otherwise KubeBlocks server will try to create rbac resources
--restore-to-time string Set a time for point in time recovery
--service-reference stringArray Set the other KubeBlocks cluster dependencies, each '--service-reference' corresponds to a cluster service. (e.g --service-reference name=pulsarZookeeper,cluster=zookeeper,namespace=default)
--set stringArray Set the cluster resource including cpu, memory, replicas and storage, each set corresponds to a component.(e.g. --set cpu=1,memory=1Gi,replicas=3,storage=20Gi)
-f, --set-file string Use yaml file, URL, or stdin to set the cluster resource
--tenancy string Tenancy options, one of: (SharedNode, DedicatedNode) (default "SharedNode")
--termination-policy string Termination policy, one of: (DoNotTerminate, Halt, Delete, WipeOut) (default "Delete")
--tolerations strings Tolerations for cluster, such as "key=value:effect, key:effect", for example '"engineType=mongo:NoSchedule", "diskType:NoSchedule"'
--topology-keys stringArray Topology keys for affinity
--volume-restore-policy string the volume claim restore policy, supported values: [Serial, Parallel] (default "Parallel")
-h, --help help for create
```

### Options inherited from parent commands
Expand Down
Loading