Kubernetes部署MogDB/openGauss

2024年 1月 4日 99.4k 0

原作者:李宏达

一、k8s安装

自行参考官方文档安装

二、编写yaml

cat mogdb.yaml

apiVersion: v1
kind: Pod
metadata:
name: mogdb
spec:
containers:
- image: swr.cn-north-4.myhuaweicloud.com/mogdb/mogdb:2.0.1_arm_k8s
command: ["/bin/bash"]
args: ["-c", "--", "/usr/local/bin/entrypoint.sh mogdb"]
imagePullPolicy: IfNotPresent
name: mogdb
ports:
- containerPort: 5432
name: mogdb
protocol: TCP
volumeMounts:
- mountPath: /mogdb
name: data
imagePullSecrets:
- name: default-secret
volumes:
- name: data
emptyDir: {}

x86镜像源课换为swr.cn-north-4.myhuaweicloud.com/mogdb/mogdb:2.0.1_amd_k8s

三、启动

1. 启动pod

kubectl create -f mogdb.yaml
pod/mogdb created

kubectl get pod mogdb
NAME READY STATUS RESTARTS AGE
mogdb 1/1 Running 0 26s

2. 进入容器

[root@mogdb-kernel-0005 ~]# kubectl exec -it mogdb -- bash
root@mogdb:/# su - omm
omm@mogdb:~$ gsql -d postgres -p5432 -r
gsql ((MogDB 2.0.1 build f892ccb7) compiled at 2021-07-09 16:12:59 commit 0 last mr )
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.

postgres=# \copyright
MogDB Database Management System
Copyright (c) Yunhe Enmo (Beijing) Information Technology Co., Ltd. Copyright 2020 , All rights reserved.

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论