Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anubhavmishra/kuberdbs
Get ondemand databases on top of Kubernetes using curl
https://github.com/anubhavmishra/kuberdbs
databases kubernetes mysql redis
Last synced: 19 days ago
JSON representation
Get ondemand databases on top of Kubernetes using curl
- Host: GitHub
- URL: https://github.com/anubhavmishra/kuberdbs
- Owner: anubhavmishra
- Created: 2017-05-07T05:34:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-18T04:48:01.000Z (over 7 years ago)
- Last Synced: 2024-10-28T13:47:38.261Z (2 months ago)
- Topics: databases, kubernetes, mysql, redis
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# kuberdbs
Get ondemand databases on top of Kubernetes using `curl`.## Databases
This project currently supports the following databases:
* Redis
* MySQL## Usage
Edit kuberdbs kubernetes deployment and replace `--redis-addr` and `--mysql-addr` with your redis and mysql database hostnames in the kubernetes cluster```bash
vim kubernetes/kuberdbs-deployment.yaml
....
args:
- "--redis-addr"
- "redis.redis:6379" # change this to your redis server address
- "--mysql-addr"
- "mysql.mysql:3306" # change this to your mysql server address
....
```Edit kuberdbs secret file
```bash
vim kubernetes/kuberdbs-secret.yaml
apiVersion: v1
data:
rootpw: "MYSQL_ROOT_PASSWORD" # change this to your mysql password
kind: Secret
metadata:
name: mysql-secret
```Create deployment
```bash
kubectl apply -f kubernetes/kuberdbs-deployment.yaml
```Create `kuberdbs` service
```bash
kubectl apply -f kubernetes/kuberdbs-service.yaml
```Get load balancer address
```bash
kubectl describe service kuberdbs
Name: kuberdbs
Namespace: default
Labels: app=kuberdbs
Annotations: kubectl.kubernetes.io/last-applied-configuration=
Selector: app=kuberdbs
Type: LoadBalancer
IP: 10.0.0.0
LoadBalancer Ingress: kuberdbs.region.elb.amazonaws.com
Port: kuberdbs 80/TCP
NodePort: kuberdbs 32122/TCP
Endpoints: 10.0.0.1:8080
Session Affinity: None
Events:
```Get a new Redis database
```bash
curl http://kuberdbs.region.elb.amazonaws.com/redis
```Which will return something like:
```
REDIS_URL=redis://redis.redis:9999/4524
```Get a new MySQL database:
```bash
curl http://kuberdbs.region.elb.amazonaws.com/mysql
```Which will return something like:
```
DATABASE_URL=mysql://Username:[email protected]:3306/DatabaseName
```