Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: merge cn api docs in user docs #8374

Merged
merged 13 commits into from
Nov 5, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,14 @@ kbcli cluster expose ${cluster-name} --type vpc --enable=true
</TabItem>
<TabItem value="kubectl" label="kubectl">

This example uses a MySQL cluster to demonstrate how to expose a VPC address on Alibaba Cloud.

```yaml
kubectl apply -f - <<EOF
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
name: ops-expose
name: ops-expose-enable
spec:
clusterRef: mycluster
expose:
Expand Down Expand Up @@ -136,7 +138,7 @@ kubectl apply -f - <<EOF
apiVersion: apps.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
name: ops-expose
name: ops-expose-disable
spec:
clusterRef: mycluster
expose:
Expand All @@ -156,10 +158,9 @@ EOF
</TabItem>
</Tabs>


## Scenario 3. Connect database with clients in other VPCs or public networks

You can enable the External LoadBalancer of the cloud vendor.
If the client is in a different VPC and requires public access, you can enable the cloud vendor's External LoadBalancer.

:::note

Expand All @@ -177,6 +178,8 @@ kbcli cluster expose ${cluster-name} --type internet --enable=true
</TabItem>
<TabItem value="kubectl" label="kubectl">

The example uses MySQL to demonstrate how to expose the public address on Alibaba Cloud.

```yaml
kubectl apply -f - <<EOF
apiVersion: apps.kubeblocks.io/v1alpha1
Expand All @@ -186,23 +189,22 @@ metadata:
spec:
clusterRef: mycluster
expose:
- componentName: mysql
services:
- annotations:
service.beta.kubernetes.io/alibaba-cloud-loadbalancer-address-type: internet
ipFamilyPolicy: PreferDualStack
name: vpc
serviceType: LoadBalancer
switch: Enable
- componentName: mysql
services:
- annotations:
service.beta.kubernetes.io/alibaba-cloud-loadbalancer-address-type: internet
ipFamilyPolicy: PreferDualStack
name: internet
serviceType: LoadBalancer
switch: Enable
ttlSecondsBeforeAbort: 0
type: Expose
EOF
EOF
```

</TabItem>
</Tabs>


To disable the LoadBalancer instance, execute the following command.

<Tabs>
Expand All @@ -229,7 +231,7 @@ spec:
- annotations:
service.beta.kubernetes.io/alibaba-cloud-loadbalancer-address-type: internet
ipFamilyPolicy: PreferDualStack
name: vpc
name: internet
serviceType: LoadBalancer
switch: Disable
ttlSecondsBeforeAbort: 0
Expand All @@ -244,4 +246,4 @@ EOF

The instance is inaccessible after you disable the LoadBalancer instance.

:::
:::
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Before connecting to the MySQL database running inside your Kubernetes cluster,
Use the kubectl get secrets command to extract the username from the secret named `mycluster-conn-credential` in the demo namespace.

```bash
kubectl get secrets -n demo mycluster-conn-credential -o jsonpath='{.data.\username}' | base64 -d
kubectl get secrets -n demo mycluster-conn-credential -o jsonpath='{.data.username}' | base64 -d
>
root
```
Expand All @@ -70,7 +70,7 @@ Before connecting to the MySQL database running inside your Kubernetes cluster,
2. Retrieve the `password`:

```bash
kubectl get secrets -n demo mycluster-conn-credential -o jsonpath='{.data.\password}' | base64 -d
kubectl get secrets -n demo mycluster-conn-credential -o jsonpath='{.data.password}' | base64 -d
>
2gvztbvz
```
Expand Down Expand Up @@ -109,7 +109,7 @@ In some cases, you may need to connect directly to a MySQL database running insi
kubectl exec -ti -n demo mycluster-mysql-0 -- bash
```
- `-ti`: Opens an interactive terminal session (-t allocates a pseudo-TTY, and -i keeps the session open).
- `-ti`: Opens an interactive terminal session (-t allocates a TTY, and -i passes stdin to the container).
- `-n demo`: Specifies the demo namespace where your Pod is running.
- `mycluster-mysql-0`: The name of the MySQL Pod. Make sure to replace this with the actual Pod name if it's different.
- `-- bash`: Opens a Bash shell inside the Pod. You can also use sh if Bash is not available in the container.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ If you do not configure the BackupRepo information when installing KubeBlocks, y
annotations:
dataprotection.kubeblocks.io/is-default-repo: "true"
spec:
storageProviderRef: gcs
storageProviderRef: gcs-s3comp
accessMethod: Tool
pvReclaimPolicy: Retain
volumeCapacity: 100Gi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ The K8s services provided by the cloud providers include both internal and exter
##### For the self-host environment
This tutorial takes Cillium Cluster Mesh as an example. Deploy Cillium as the overlay mode and the cluster configuration for each data plane clusters is as follows:
This tutorial takes Cilium Cluster Mesh as an example. Deploy Cilium as the overlay mode and the cluster configuration for each data plane clusters is as follows:
| Cluster | Context | Name | ID | CIDR |
|:-------:|:-------:|:-----:|:--:|:-----------:|
Expand All @@ -109,7 +109,7 @@ The CIDR mentioned here refers to the address of the Cilium Overlay network. Whe
The following steps can be performed separately in each cluster (without the `--context` parameter) or collectively in an environment with the information of three contexts (by specifying the `--context` parameter for each).
1. Install Cilium, specifying the cluster ID/name and the cluster pool pod CIDR. Refer to the Cillium doc for details: [Specify the Cluster Name and ID](https://docs.cilium.io/en/stable/network/clustermesh/clustermesh/#specify-the-cluster-name-and-id).
1. Install Cilium, specifying the cluster ID/name and the cluster pool pod CIDR. Refer to the Cilium doc for details: [Specify the Cluster Name and ID](https://docs.cilium.io/en/stable/network/clustermesh/clustermesh/#specify-the-cluster-name-and-id).
```bash
cilium install --set cluster.name=k8s-1 --set cluster.id=1 --set ipam.operator.clusterPoolIPv4PodCIDRList=10.1.0.0/16 —context k8s-1
Expand Down Expand Up @@ -139,7 +139,7 @@ The following steps can be performed separately in each cluster (without the `--
cilium clustermesh status —wait —context k8s-3
```
4. (Optional) Check the status of the tunnels between cluster by using the cilliun-dbg tool. Refer to [the official doc](https://docs.cilium.io/en/stable/cmdref/cilium-dbg/) for details.
4. (Optional) Check the status of the tunnels between cluster by using the cilium-dbg tool. Refer to [the official doc](https://docs.cilium.io/en/stable/cmdref/cilium-dbg/) for details.
```bash
cilium-dbg bpf tunnel list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ KubeBlocks 基于 K8s service 抽象来提供内外部的服务访问。对于 s

##### 自建方案

东西向互访的自建方案以 Cillium Cluster Mesh 为例来进行说明,Cillium 的部署选择 overlay 模式,各 data plane 集群配置如下:
东西向互访的自建方案以 Cilium Cluster Mesh 为例来进行说明,Cilium 的部署选择 overlay 模式,各 data plane 集群配置如下:

| Cluster | Context | Name | ID | CIDR |
|:-------:|:-------:|:-----:|:--:|:-----------:|
Expand Down
Loading
Loading