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
20 changes: 2 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ curl -fsSL https://kubeblocks.io/installer/install_cli.sh | bash
sudo apt-get update
sudo apt-get install kbcli
```

***For Debian-based distributions, in addition to the installation method above, you can also install it through the following methods:***
```bash
echo "deb [trusted=yes] https://apt.fury.io/kubeblocks/ /" | sudo tee /etc/apt/sources.list.d/kbcli.list
sudo apt update
sudo apt install kbcli
```

**Red Hat-based distributions**

1. Installs the package yum-utils using the package manager yum.
Expand Down Expand Up @@ -179,22 +179,6 @@ View the details of a specified database cluster, such as `STATUS`, `Endpoints`,
kbcli cluster describe mycluster
```

Wait until the status of this cluster is `Running`, run `kbcli cluster connect` to access a specified database cluster. For example,

```bash
kbcli cluster connect mycluster
```

List and open the grafana dashboard.

```bash
# list all dashboards
kbcli dashboard list

# open grafana dashboard
kbcli dashboard open kubeblocks-grafana
```

### Destroy Playground

```bash
Expand Down
67 changes: 67 additions & 0 deletions docs/user_docs/cli/kbcli_cluster_custom-ops_kafka-quota.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: kbcli cluster custom-ops kafka-quota
---

Create a custom ops with opsDef kafka-quota

```
kbcli cluster custom-ops kafka-quota <ClusterName> [flags]
```

### Examples

```
# Create a kafka-quota ops
kbcli cluster custom-ops kafka-quota <clusterName> --component <componentName>
```

### Options

```
--auto-approve Skip interactive approval before promote the instance
--client string client id.
--component string Specify the component name of the cluster. if not specified, using the first component which referenced the defined componentDefinition.
--consumer-byte-rate int the maximum number of messages that can be consumed per second, measured in bytes/sec
--controller-mutation-rate int partition mutation quota to control the rate at which mutations are accepted for user requests.
--delete-quotas stringArray
--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
--force skip the pre-checks of the opsRequest to run the opsRequest forcibly
-h, --help help for kafka-quota
--name string OpsRequest name. if not specified, it will be randomly generated
-o, --output format Prints the output in the specified format. Allowed values: JSON and YAML (default yaml)
--producer-byte-rate int the maximum number of messages that can be produced per second, measured in bytes/sec
--request-percentage int request percentage.
--ttlSecondsAfterSucceed int Time to live after the OpsRequest succeed
--user string user name
```

### Options inherited from parent commands

```
--as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace.
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation.
--cache-dir string Default cache directory (default "$HOME/.kube/cache")
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--disable-compression If true, opt-out of response compression for all requests to the server
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
--match-server-version Require server version to match client version
-n, --namespace string If present, the namespace scope for this CLI request
--request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
-s, --server string The address and port of the Kubernetes API server
--tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used
--token string Bearer token for authentication to the API server
```

### SEE ALSO

* [kbcli cluster custom-ops](kbcli_cluster_custom-ops.md) -

#### Go Back to [CLI Overview](cli.md) Homepage.

74 changes: 74 additions & 0 deletions docs/user_docs/cli/kbcli_cluster_custom-ops_kafka-topic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
title: kbcli cluster custom-ops kafka-topic
---

Create a custom ops with opsDef kafka-topic

```
kbcli cluster custom-ops kafka-topic <ClusterName> [flags]
```

### Examples

```
# Create a kafka-topic ops
kbcli cluster custom-ops kafka-topic <clusterName> --component <componentName> --topic=<topic> --type=<type>
```

### Options

```
--auto-approve Skip interactive approval before promote the instance
--component string Specify the component name of the cluster. if not specified, using the first component which referenced the defined componentDefinition.
--config string A topic configuration override for the topic being created or altered.
--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
--force skip the pre-checks of the opsRequest to run the opsRequest forcibly
-h, --help help for kafka-topic
--name string OpsRequest name. if not specified, it will be randomly generated
-o, --output format Prints the output in the specified format. Allowed values: JSON and YAML (default yaml)
--partitions int The number of partitions for the topic being created or altered (WARNING:
If partitions are increased for a topic that has a key, the partition logic or ordering
of the messages will be affected). If not supplied for create, defaults to the cluster default.
Value range [1, 10000].
--replicas int The replication factor for each partition in the topic being
created. If not supplied, defaults to the cluster default.
Value range [1, 10].
--topic string The topic to create, alter or delete. It also accepts a regular
expression, except for --create option. Put topic name in double quotes and
use the '\' prefix to escape regular expression symbols; e.g. "test\.topic".

--ttlSecondsAfterSucceed int Time to live after the OpsRequest succeed
--type string operation type, supports value: [create, alter, delete]. Legal values [create, alter, delete].
```

### Options inherited from parent commands

```
--as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace.
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation.
--cache-dir string Default cache directory (default "$HOME/.kube/cache")
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--disable-compression If true, opt-out of response compression for all requests to the server
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
--match-server-version Require server version to match client version
-n, --namespace string If present, the namespace scope for this CLI request
--request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
-s, --server string The address and port of the Kubernetes API server
--tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used
--token string Bearer token for authentication to the API server
--user string The name of the kubeconfig user to use
```

### SEE ALSO

* [kbcli cluster custom-ops](kbcli_cluster_custom-ops.md) -

#### Go Back to [CLI Overview](cli.md) Homepage.

73 changes: 73 additions & 0 deletions docs/user_docs/cli/kbcli_cluster_custom-ops_kafka-user-acl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: kbcli cluster custom-ops kafka-user-acl
---

Create a custom ops with opsDef kafka-user-acl

```
kbcli cluster custom-ops kafka-user-acl <ClusterName> [flags]
```

### Examples

```
# Create a kafka-user-acl ops
kbcli cluster custom-ops kafka-user-acl <clusterName> --component <componentName> --operations=<operations> --type=<type>
```

### Options

```
--allow-hosts stringArray
--allow-users stringArray
--auto-approve Skip interactive approval before promote the instance
--cluster string Indicates to the script that the user is trying to interact with acls on the singular cluster resource.
--component string Specify the component name of the cluster. if not specified, using the first component which referenced the defined componentDefinition.
--consumer indicate to add or remove the acl of consumer.
--deny-hosts stringArray
--deny-users stringArray
--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
--force skip the pre-checks of the opsRequest to run the opsRequest forcibly
--group string consumer-group.
-h, --help help for kafka-user-acl
--name string OpsRequest name. if not specified, it will be randomly generated
--operations stringArray
-o, --output format Prints the output in the specified format. Allowed values: JSON and YAML (default yaml)
--pattern-type string Resource pattern type.
--producer indicate to add or remove the acl of producer.
--topic string topic name.
--transactional-id string The transactionalId to which ACLs should be added or removed. A value of * indicates the ACLs should apply to all transactionalIds.
--ttlSecondsAfterSucceed int Time to live after the OpsRequest succeed
--type string user name
```

### Options inherited from parent commands

```
--as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace.
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation.
--cache-dir string Default cache directory (default "$HOME/.kube/cache")
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
--context string The name of the kubeconfig context to use
--disable-compression If true, opt-out of response compression for all requests to the server
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
--match-server-version Require server version to match client version
-n, --namespace string If present, the namespace scope for this CLI request
--request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
-s, --server string The address and port of the Kubernetes API server
--tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used
--token string Bearer token for authentication to the API server
--user string The name of the kubeconfig user to use
```

### SEE ALSO

* [kbcli cluster custom-ops](kbcli_cluster_custom-ops.md) -

#### Go Back to [CLI Overview](cli.md) Homepage.

Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: kbcli cluster custom-ops pg-update-standby-config
---

Create a custom ops with opsDef pg-update-standby-config

```
kbcli cluster custom-ops pg-update-standby-config <ClusterName> [flags]
```

### Examples

```
# Create a pg-update-standby-config ops
kbcli cluster custom-ops pg-update-standby-config <clusterName> --component <componentName>
```

### Options

```
--auto-approve Skip interactive approval before promote the instance
--component string Specify the component name of the cluster. if not specified, using the first component which referenced the defined componentDefinition.
--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
--force skip the pre-checks of the opsRequest to run the opsRequest forcibly
-h, --help help for pg-update-standby-config
--name string OpsRequest name. if not specified, it will be randomly generated
-o, --output format Prints the output in the specified format. Allowed values: JSON and YAML (default yaml)
--primary-endpoint string primaryEndpoint defines endpoint of the primary instance.empty string means no primary instance.
The format is {host}:{port}

--ttlSecondsAfterSucceed int Time to live after the OpsRequest succeed
```

### Options inherited from parent commands

```
--as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace.
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation.
--cache-dir string Default cache directory (default "$HOME/.kube/cache")
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--disable-compression If true, opt-out of response compression for all requests to the server
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
--match-server-version Require server version to match client version
-n, --namespace string If present, the namespace scope for this CLI request
--request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
-s, --server string The address and port of the Kubernetes API server
--tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used
--token string Bearer token for authentication to the API server
--user string The name of the kubeconfig user to use
```

### SEE ALSO

* [kbcli cluster custom-ops](kbcli_cluster_custom-ops.md) -

#### Go Back to [CLI Overview](cli.md) Homepage.

Loading
Loading