github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/docs/user_docs/cli/kbcli_playground_init.md (about) 1 --- 2 title: kbcli playground init 3 --- 4 5 Bootstrap a kubernetes cluster and install KubeBlocks for playground. 6 7 ### Synopsis 8 9 Bootstrap a kubernetes cluster and install KubeBlocks for playground. 10 11 If no cloud provider is specified, a k3d cluster named kb-playground will be created on local host, otherwise a kubernetes cluster will be created on the specified cloud. Then KubeBlocks will be installed on the created kubernetes cluster, and an apecloud-mysql cluster named mycluster will be created. 12 13 ``` 14 kbcli playground init [flags] 15 ``` 16 17 ### Examples 18 19 ``` 20 # create a k3d cluster on local host and install KubeBlocks 21 kbcli playground init 22 23 # create an AWS EKS cluster and install KubeBlocks, the region is required 24 kbcli playground init --cloud-provider aws --region us-west-1 25 26 # create an Alibaba cloud ACK cluster and install KubeBlocks, the region is required 27 kbcli playground init --cloud-provider alicloud --region cn-hangzhou 28 29 # create a Tencent cloud TKE cluster and install KubeBlocks, the region is required 30 kbcli playground init --cloud-provider tencentcloud --region ap-chengdu 31 32 # create a Google cloud GKE cluster and install KubeBlocks, the region is required 33 kbcli playground init --cloud-provider gcp --region us-east1 34 35 # after init, run the following commands to experience KubeBlocks quickly 36 # list database cluster and check its status 37 kbcli cluster list 38 39 # get cluster information 40 kbcli cluster describe mycluster 41 42 # connect to database 43 kbcli cluster connect mycluster 44 45 # view the Grafana 46 kbcli dashboard open kubeblocks-grafana 47 48 # destroy playground 49 kbcli playground destroy 50 ``` 51 52 ### Options 53 54 ``` 55 --auto-approve Skip interactive approval during the initialization of playground 56 --cloud-provider string Cloud provider type, one of [local aws gcp alicloud tencentcloud] (default "local") 57 --cluster-definition string Specify the cluster definition, run "kbcli cd list" to get the available cluster definitions (default "apecloud-mysql") 58 --cluster-version string Specify the cluster version, run "kbcli cv list" to get the available cluster versions 59 -h, --help help for init 60 --region string The region to create kubernetes cluster 61 --timeout duration Time to wait for init playground, such as --timeout=10m (default 5m0s) 62 --version string KubeBlocks version 63 ``` 64 65 ### Options inherited from parent commands 66 67 ``` 68 --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. 69 --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. 70 --as-uid string UID to impersonate for the operation. 71 --cache-dir string Default cache directory (default "$HOME/.kube/cache") 72 --certificate-authority string Path to a cert file for the certificate authority 73 --client-certificate string Path to a client certificate file for TLS 74 --client-key string Path to a client key file for TLS 75 --cluster string The name of the kubeconfig cluster to use 76 --context string The name of the kubeconfig context to use 77 --disable-compression If true, opt-out of response compression for all requests to the server 78 --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure 79 --kubeconfig string Path to the kubeconfig file to use for CLI requests. 80 --match-server-version Require server version to match client version 81 -n, --namespace string If present, the namespace scope for this CLI request 82 --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") 83 -s, --server string The address and port of the Kubernetes API server 84 --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 85 --token string Bearer token for authentication to the API server 86 --user string The name of the kubeconfig user to use 87 ``` 88 89 ### SEE ALSO 90 91 * [kbcli playground](kbcli_playground.md) - Bootstrap or destroy a playground KubeBlocks in local host or cloud. 92 93 #### Go Back to [CLI Overview](cli.md) Homepage. 94