Skip to content

Commit

Permalink
recover k8s and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sjcsjc123 committed Jan 23, 2024
1 parent d479500 commit ffab209
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ git clone https://github.com/ByteStorage/FlyDB.git

## 🖥 How to use FlyDB ?

### Used by Golang SDK

Here is a simple example of how to use the Linux version:

> See flydb/examples for details.
Expand Down Expand Up @@ -65,12 +67,34 @@ func main() {
}
}
```
>You can also run this command.
### Used By Shell Command

```shell
./build.sh
```

### Used By Docker

```shell
docker run -d --name flydb-server --network=host -p 8999:8999 bytestorage/flydb:v1.0
```

### Used By Kubernetes

```shell
kubectl apply -f kubernetes/flydb-namespace.yaml
kubectl apply -f kubernetes/flydb-deployment.yaml
kubectl apply -f kubernetes/flydb-service.yaml
kubectl wait --for=condition=ready pod -l app=flydb -n flydb-system
kubectl port-forward svc/flydb-service -n flydb-system 8999:8999
```

**When install flydb server by shell/docker/kubernetes, you can use the flydb-cli to connect the flydb server.**

```shell
./bin/flydb-client 127.0.0.1:8999"
```
## 🚀 Performance test
We did a simple performance test of the V1.0.4 version of FlyDB. This test mainly focused on reading and writing large-scale data, and we selected 500,000 random data for testing.
Expand Down
4 changes: 3 additions & 1 deletion kubernetes/flydb-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: flydb-deployment
namespace: flydb-system
spec:
replicas: 1
selector:
Expand All @@ -14,7 +15,8 @@ spec:
spec:
containers:
- name: flydb-container
image: 1234sdc/flydb
image: bytestorage/flydb:v1.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8999
hostPort: 8999
4 changes: 4 additions & 0 deletions kubernetes/flydb-namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: flydb-system
1 change: 1 addition & 0 deletions kubernetes/flydb-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: flydb-service
namespace: flydb-system
spec:
selector:
app: flydb
Expand Down

0 comments on commit ffab209

Please sign in to comment.