Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Oracle database on Kubernetes

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to install Oracle database on Kubernetes, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Kubernetes is a portable, extensible, open source platform for managing containerized workloads and services that facilitate declarative configuration and automation. Kubernetes has a large and fast-growing ecosystem. Kubernetes's services, support, and tools are widely available.

Oracle deployment

The following is the definition code for the Oracle deployment, which consists of two parts, the deployment of the Oracle deployment and its proxy service. The Oracle database deployed here is 11g R2, and the mirror uses mybook2019/oracle-ee-11g:v1.0. The ports 1521 and 1158 are exposed through NodePort mode, and the data of Oracle is persisted through the nfs file system.

#-define oralce proxy service-apiVersion: v1kind: Servicemetadata: name: oralce-svc labels: app: type: NodePort ports:-port: 1521 targetPort: 1521 name: oracle1521-port: 8080 targetPort: 8080 name: oralce8080 selector: app: oralce---#- definition oralce Deploy-apiVersion: apps/v1kind: Deploymentmetadata: name: oralcespec: replicas: 1 selector: matchLabels: app: oralce strategy: type: Recreate template: metadata: labels: app: oralcespec: containers:-image: mybook2019/oracle-ee-11g:v1.0 name: oralce-containerPort: 1521 name : oralce1521-containerPort: 8080 name: oralce8080 volumeMounts:-name: oralce-data mountPath: / u01/app/oracle volumes:-name: oralce-data nfs: path: / home/sharenfs/oracle server: 192.168.132

From kubectl, execute the following command to deploy the Oracle database in the Kubernetes cluster.

$kubectl create-f oracle11g-en.yaml-- namespace=kube-public

After the deployment is complete, you can view the ports exposed by oracle (the ports here are 1521 and 32175) with the following command:

$kubectl get svc-- namespace=kube-publickubernetes- deployment Oracle database step kubernetes- deployment Oracle database step deployment verification

1) for applications in the Kubernetes cluster, the information about connecting to the database is as follows:

Hostname: oracle-svc.kube-publicport: 1521sid: EEservice name: EE.oracle.dockerusername: systempassword: oracle

On the same machine as the oracle client, execute the following command to connect to the database.

$sqlplus system/oracle@//oracle-svc.kube-public:1521/EE.oracle.docker

2) for applications outside the Kubernetes cluster, the relevant information used to connect to the database is as follows:

Hostname: 10.0.32.165port: 32175sid: EEservice name: EE.oracle.dockerusername: systempassword: oracle

On the same machine as the oracle client, execute the following command to connect to the database.

The above $sqlplus system/oracle@//10.0.32.165:32175/EE.oracle.docker is all the contents of the article "how to install Oracle Database on Kubernetes". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report