Skip to content

Commit 800d469

Browse files
committed
udpate db docs
1 parent fdd0ab3 commit 800d469

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

site/database.md

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,25 @@ persistent store/leases etc in there
44

55
# Running the Oracle Database in Kubernetes
66

7-
**PLEASE NOTE**: This page is a work in progress. We will update this with either better details about how to put the data files onto a persistent volume, or a pointer to the official Oracle Database Kubernetes pages, or both.
7+
If you wish to run the Oracle Database inside your Kubernetes cluster, in order to place
8+
your state store, leasing tables, etc., in that database, then you can use this
9+
sample to install the database.
810

11+
First create a namespace for the database:
12+
13+
```
14+
kubectl create namespace database-namespace
915
```
1016

17+
Next, create a file called `database.yml` with the following content. Make sure you update the
18+
password field with you chosen administrator password for the database.
19+
20+
```
1121
apiVersion: extensions/v1beta1
1222
kind: Deployment
1323
metadata:
1424
name: database
15-
namespace: domain2
25+
namespace: database-namespace
1626
labels:
1727
app: database
1828
version: 12.1.0.2
@@ -68,7 +78,7 @@ apiVersion: v1
6878
kind: Service
6979
metadata:
7080
name: database
71-
namespace: domain2
81+
namespace: database-namespace
7282
spec:
7383
selector:
7484
app: database
@@ -78,3 +88,30 @@ spec:
7888
port: 1521
7989
targetPort: 1521
8090
```
91+
92+
If you have not previously done so, you will need to go to the [Oracle Container Registry](https://container-registry.oracle.com)
93+
and accept the license for the [Oracle database image](https://container-registry.oracle.com/pls/apex/f?p=113:4:11538835301670).
94+
95+
Create a Docker registry secret so that Kubernetes can pull the database image:
96+
97+
```
98+
kubectl create secret docker-registry regsecret \
99+
--docker-server=container-registry.oracle.com \
100+
101+
--docker-password=your-password \
102+
103+
-n database-namespace
104+
105+
```
106+
107+
Now use the following command to install the database:
108+
109+
```
110+
kubectl apply -f database.yml
111+
```
112+
113+
This will start up the database and expose it in the cluster at the following address:
114+
115+
```
116+
database.database-namespace.svc.cluster.local:1521
117+
```

site/user-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ presented in the correct order.
4141
* [Deleting domains](domains.md#deleting-domains)
4242
* [Additional integrations](additional-integrations.md)
4343
* [Sending WebLogic metrics to Prometheus](additional-integrations.md#sending-weblogic-metrics-to-prometheus)
44-
44+
* [Running an Oracle database in your cluster](database.md) for state stores, leasing, etc.
4545

4646
## Important terms
4747

0 commit comments

Comments
 (0)