Installing OmniDB in kubernetes as deployment resource
OmniDB is tool for unify the multiple type DataBase management,appropriate deploy in enterprise internal proxy access to other environment.
fetch the Dockerfile
in this url: OminDB Dockerfile
Build the docker image docker build . -t dev.com/library/omnidb:latest
then push the image to registry:docker push dev.com/library/omnidb:latest
create the kubernetes deployment manifest file
1apiVersion: v1
2kind: PersistentVolumeClaim
3metadata:
4 name: omnidb-pvc
5spec:
6 accessModes:
7 - ReadWriteOnce
8 storageClassName: nfs-client
9 resources:
10 requests:
11 storage: 5Gi
12---
13apiVersion: apps/v1
14kind: Deployment
15metadata:
16 name: omnidb-deployment
17 labels:
18 app: omnidb
19spec:
20 replicas: 1
21 selector:
22 matchLabels:
23 app: omnidb
24 template:
25 metadata:
26 labels:
27 app: omnidb
28 spec:
29 containers:
30 - name: omnidb
31 image: dev.com/library/omnidb:latest
32 ports:
33 - containerPort: 8000
34 volumeMounts:
35 - mountPath: /home/omnidb/.omnidb
36 name: omnidb-data
37 volumes:
38 - name: omnidb-data
39 persistentVolumeClaim:
40 claimName: omnidb-pvc
41---
42apiVersion: v1
43kind: Service
44metadata:
45 name: omnidb
46spec:
47 ports:
48 - name: server
49 port: 8080
50 targetPort: 8000
51 selector:
52 app: omnidb
Add the ingress in order to access to OmniDB
1kind: Ingress
2apiVersion: extensions/v1beta1
3metadata:
4 name: omnidb-ingress
5 namespace: default
6 labels:
7 app: omnidb
8 annotations:
9 ingress.kubernetes.io/proxy-body-size: '0'
10 nginx.ingress.kubernetes.io/proxy-body-size: '0'
11 nginx.ingress.kubernetes.io/ssl-redirect: 'true'
12spec:
13 rules:
14 - host: omnidb.dev.com
15 http:
16 paths:
17 - path: /
18 backend:
19 serviceName: omnidb
20 servicePort: 8080