title |
---|
Getting Started with Kubernetes |
This article describes how to quickly launch a WeScale cluster in a Kubernetes cluster and outlines some basic cluster operations, such as modifying configurations, viewing logs, connecting to the cluster, and more.
WeScale uses Kubeblocks as the Kubernetes Operator. Thanks to the powerful operational capabilities of Kubeblocks, you can deploy and use WeScale locally or with any cloud provider.
Before you begin, you need to have a Kubernetes cluster. If you don't have one, you can create a cluster using Minikube or Kind.
For example, you can use Kind to create a Kubernetes cluster with the following commands:
brew install kind
kind create cluster
You can install kbcli on your laptop or virtual machines on the cloud. kbcli now supports macOS, Windows, and Linux. Please refer to the following link for installation instructions: https://kubeblocks.io/docs/release-0.8/user_docs/installation/install-with-kbcli/install-kbcli
For MacOS & Linux users, you can install kbcli with the following command:
curl -fsSL https://kubeblocks.io/installer/install_cli.sh | bash
Once you have installed kbcli, you can install Kubeblocks with the following command. For more information, please refer to the following link: https://kubeblocks.io/docs/release-0.8/user_docs/installation/install-with-kbcli/install-kubeblocks-with-kbcli
kbcli kubeblocks install
You can create a WeScale cluster with just one command. For example, you can create a WeScale cluster named vt
with the following command:
kbcli cluster create mysql vt --mode raftGroup --availability-policy none --proxy-enabled true
You can list all WeScale clusters with the following command:
kbcli cluster list
You can delete a WeScale cluster with the following command:
kbcli cluster delete vt
kbcli cluster connect vt --component vtgate
kbcli cluster connect vt
- View the Configuration of VTGate
kbcli cluster describe-config vt --components vtgate --show-detail
- View the Configuration of VTTablet
kbcli cluster describe-config vt --components mysql --show-detail --config-specs vttablet-config
- View the Configuration of MySQL
kbcli cluster describe-config vt --components mysql --show-detail --config-specs mysql-consensusset-config
- Modify the Configuration of VTGate
kbcli cluster edit-config vt --components vtgate
- Modify the Configuration of VTTablet
kbcli cluster edit-config vt --components mysql --config-spec=vttablet-config
- Modify the Configuration of MySQL
kbcli cluster edit-config vt --components mysql --config-spec=mysql-consensusset-config