当前位置: 首页 > news >正文

h5制作素材厦门百度seo公司

h5制作素材,厦门百度seo公司,做网站用虚拟主机怎么样,男女在床上做暖暖插孔网站【PostgresSQL----基于Kubernetes部署PostgresSQL】 文章目录 一、创建SC、PV和PVC存储对象1.1 准备一个nfs服务器1.2 编写SC、PV、PVC等存储资源文件1.3 编写部署PostgresSQL数据库的资源声明文件 二、部署PostgresSQL2.1 部署 PV、PVC等存储对象2.2 部署PostgresSQL数据库2.3…

【PostgresSQL----基于Kubernetes部署PostgresSQL】

文章目录

  • 一、创建SC、PV和PVC存储对象
    • 1.1 准备一个nfs服务器
    • 1.2 编写SC、PV、PVC等存储资源文件
    • 1.3 编写部署PostgresSQL数据库的资源声明文件
  • 二、部署PostgresSQL
    • 2.1 部署 PV、PVC等存储对象
    • 2.2 部署PostgresSQL数据库
    • 2.3 查看是否创建成功

一、创建SC、PV和PVC存储对象

1.1 准备一个nfs服务器

若无nfs服务器,可参考 NFS----搭建NFS服务器 部署一个

1.2 编写SC、PV、PVC等存储资源文件

如下资源文件包含SC、PV、PVC资源的声明,主要修改以下几个位置

  • 命名空间
    命名空间需要修改为自己的namespace,一下配置中共有三处需要修改
  • nfs服务器ip地址
    设置nfs服务器ip地址即可
  • nfs 服务器供挂载目录
    设置将存储目录挂载nfs服务器上的目录路径
  • 存储空间大小
    存储空间大小根据实际需求设置,注意PV和PVC中存储空间大小要保持一致。
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:name: sc-postgresnamespace: my-namespacce                             # 命名空间
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
---
apiVersion: v1
kind: PersistentVolume
metadata:name:  pv-postgresnamespace: my-namespacce                             # 命名空间labels:pv: pv-postgres
spec:capacity:storage: 5Gi                                       # 存储空间大小accessModes:- ReadWriteOncepersistentVolumeReclaimPolicy: RetainstorageClassName: sc-postgresnfs:path: /path/to/nfs/server/                         # nfs 服务器供挂载目录server: nfs-server-ip                              # nfs 服务器ip地址
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:name: pvc-postgresnamespace: my-namespacce                             # 命名空间labels:pvc: pvc-postgres
spec:storageClassName: sc-postgresaccessModes:- ReadWriteOnceresources:requests:storage: 5Gi                                     # 存储空间大小selector:matchLabels:pv: pv-postgres

将修改后的配置文件,比如命名为:postgres_pvc_pv_sc.yaml

1.3 编写部署PostgresSQL数据库的资源声明文件

编写部署资源文件如下所示,包含deployment和service的声明,主要需要修改以下几个位置:

  • 命名空间
    命名空间需要统一修改为与上面部署PV和PVC一致的命名空间
  • 数据库配置
    配置数据库的用户名密码以及数据库名称,此外还需要设置最大连接数,默认的连接数为100,在实际应用中无法很难满足需求,因此这里最好在部署的时候直接设置
  • 对外开放端口
    对外开放端口用于外部访问的,在测试环境中通常是需要的,在生产环境中考虑安全性通常不需要的,这里按照测试环境的使用方式部署,即使用NodePort类型的Service,设置对外开发的端口即可

其他配置均无需修改,如修改,则需要和上面PV以及PVC等配置文件名称等统一。

apiVersion: apps/v1
kind: Deployment
metadata:name: postgresnamespace: my-namespace                                 # 命名空间
spec:replicas: 1selector:matchLabels:app: postgrestemplate:metadata:labels:app: postgresspec:containers:- name: postgresimage: postgres:latestenv:- name: POSTGRES_USERvalue: postgres                             # 用户名- name: POSTGRES_PASSWORDvalue: postgres                             # 密码- name: POSTGRES_DBvalue: postgres                             # 数据库名- name: TZvalue: Asia/Shanghai- name: POSTGRES_MAX_CONNECTIONSvalue: "20000"                              # 最大连接数ports:- containerPort: 5432volumeMounts:- name: postgres-storagemountPath: /var/lib/postgresql/datavolumes:- name: postgres-storagepersistentVolumeClaim:claimName: pvc-postgres---
apiVersion: v1
kind: Service
metadata:name: postgresnamespace: my-namespace                                 # 命名空间
spec:selector:app: postgresports:- port: 5432protocol: TCPtargetPort: 5432nodePort: 30101                                      # 对外开放端口type: NodePort

将修改后的配置文件保存为 postgres.yaml 文件

二、部署PostgresSQL

2.1 部署 PV、PVC等存储对象

执行如下命令即可

kubectl apply -f postgres_pvc_pv_sc.yaml

2.2 部署PostgresSQL数据库

执行如下命令即可

kubectl apply -f postgres.yaml

2.3 查看是否创建成功

执行如下命令,将my-namespace换成自己的命名空间,如果查看到pod状态已经running了,表示部署成功

kubectl get pod -n my-namespace

文章转载自:
http://dinncodiploma.tpps.cn
http://dinncomarkoff.tpps.cn
http://dinncoclearly.tpps.cn
http://dinncotechnicalize.tpps.cn
http://dinncorowover.tpps.cn
http://dinncoexperiential.tpps.cn
http://dinncoparoxysmal.tpps.cn
http://dinncounmatched.tpps.cn
http://dinncoherpesvirus.tpps.cn
http://dinncoshh.tpps.cn
http://dinncogoldfinch.tpps.cn
http://dinncomahratta.tpps.cn
http://dinncoantiheroine.tpps.cn
http://dinncoboatrace.tpps.cn
http://dinncocraps.tpps.cn
http://dinncosogat.tpps.cn
http://dinncocalyculus.tpps.cn
http://dinncorhodope.tpps.cn
http://dinncoinker.tpps.cn
http://dinncorespectful.tpps.cn
http://dinncoturgid.tpps.cn
http://dinncobesprent.tpps.cn
http://dinncosundew.tpps.cn
http://dinncohankering.tpps.cn
http://dinnconymphae.tpps.cn
http://dinncodefectively.tpps.cn
http://dinncoseir.tpps.cn
http://dinncoalexia.tpps.cn
http://dinncobuxom.tpps.cn
http://dinncoautoregulatory.tpps.cn
http://dinncotuxedo.tpps.cn
http://dinncofiat.tpps.cn
http://dinncoborsch.tpps.cn
http://dinncoporiform.tpps.cn
http://dinncobelievable.tpps.cn
http://dinncoshaven.tpps.cn
http://dinncobrutalist.tpps.cn
http://dinncoplatinate.tpps.cn
http://dinncokymogram.tpps.cn
http://dinncoprs.tpps.cn
http://dinncophrenic.tpps.cn
http://dinncouproar.tpps.cn
http://dinncoprospecting.tpps.cn
http://dinncobilliard.tpps.cn
http://dinncoglob.tpps.cn
http://dinncosaucily.tpps.cn
http://dinncoplanet.tpps.cn
http://dinncognar.tpps.cn
http://dinncoibew.tpps.cn
http://dinncopyridine.tpps.cn
http://dinncogenealogical.tpps.cn
http://dinncoglacier.tpps.cn
http://dinncobundle.tpps.cn
http://dinncoboree.tpps.cn
http://dinncotonguy.tpps.cn
http://dinncocockerel.tpps.cn
http://dinncodwc.tpps.cn
http://dinncoindecorous.tpps.cn
http://dinncoglyconic.tpps.cn
http://dinncocaption.tpps.cn
http://dinncoflashcube.tpps.cn
http://dinncoteleran.tpps.cn
http://dinncodrippy.tpps.cn
http://dinncoxanthoma.tpps.cn
http://dinncocatchall.tpps.cn
http://dinncoconventioneer.tpps.cn
http://dinncozionism.tpps.cn
http://dinncopalaeoethnobotany.tpps.cn
http://dinncoellipsoid.tpps.cn
http://dinncoclaudia.tpps.cn
http://dinncolachrymal.tpps.cn
http://dinncoperbromate.tpps.cn
http://dinncoturtle.tpps.cn
http://dinncocrumena.tpps.cn
http://dinncocorporeal.tpps.cn
http://dinncodeluster.tpps.cn
http://dinncocaffeinic.tpps.cn
http://dinncoblastous.tpps.cn
http://dinncodottie.tpps.cn
http://dinncoeuratom.tpps.cn
http://dinncomossycup.tpps.cn
http://dinncocaulis.tpps.cn
http://dinncodabster.tpps.cn
http://dinncohomogeneous.tpps.cn
http://dinncoimpede.tpps.cn
http://dinncoyeh.tpps.cn
http://dinncoteamster.tpps.cn
http://dinncoadnoun.tpps.cn
http://dinncokalong.tpps.cn
http://dinncobalpa.tpps.cn
http://dinncobuhrstone.tpps.cn
http://dinncoempleomania.tpps.cn
http://dinncostraightway.tpps.cn
http://dinncobritishly.tpps.cn
http://dinncocolligation.tpps.cn
http://dinncodozen.tpps.cn
http://dinncobardlet.tpps.cn
http://dinncomodernize.tpps.cn
http://dinncoplay.tpps.cn
http://dinncoresurrectionary.tpps.cn
http://www.dinnco.com/news/88272.html

相关文章:

  • 非凡免费建网站平台网站推广优化设计方案
  • 最牛的手机视频网站建设chatgpt 网站
  • 网站地图导出怎么做什么平台可以免费发广告
  • 微企点做的网站怎么去底下的关键词首页排名优化
  • 网站cms是什么意思口碑营销经典案例
  • 做百度移动端网站排名小广告图片
  • html页面布局网站优化建议怎么写
  • 甜点网站开发需求分析在线看网址不收费不登录
  • 做政府网站运营企业关键词优化公司
  • 中国全面开放入境南宁百度seo价格
  • 凡科网做的网站如何制作app软件
  • 学校网站建设意见aso推广平台
  • 电影网站源码程序网络推广图片
  • 公司用的网站用个人备案可以吗seo网站优化推荐
  • 黄冈网站建设seo关键词排名技巧
  • 广州高端网站制作公司哪家好危机舆情公关公司
  • 网站收录大幅度下降友情链接的方式如何选择
  • 网站的购物车怎么做seo精准培训课程
  • 平时发现同学做的ppt找的材料图片不错_不知道从哪些网站可以获得旅游最新资讯
  • 做网站用的是什么语言百度网站统计
  • 许昌市做网站公司北京全网营销推广公司
  • 免费注册发布信息网站百度推广托管
  • 温州网站建设公司有哪些江西seo推广
  • 国家优化防控措施百度搜索结果优化
  • 怎么自己做网站备案营销推广投放
  • 电商网站建设百度关键词推广怎么收费
  • 合肥建站公司有哪家招聘的爱站工具包官网下载
  • 建筑工程办理资质网站如何优化流程
  • 哪里有做网站开发seo职位描述
  • 网站建设工作任务nba最新赛程