- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用静态配置在本地 kubernetes 中挂载 postgrsql 持久卷。
这是我创建的 yaml 文件 pv 、 pvc 和 pod
apiVersion: v1
kind: PersistentVolume
metadata:
name: task-pv-volume
namespace: manhattan
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 100Mi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/data"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: task-pv-claim
namespace: manhattan
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 80Mi
---
apiVersion: v1
kind: Pod
metadata:
name: dbr-postgres
namespace: manhattan
spec:
volumes:
- name: task-pv-storage
persistentVolumeClaim:
claimName: task-pv-claim
containers:
- name: task-pv-container
image: postgresql:2.0.1
tty: true
volumeMounts:
- mountPath: "/var/lib/pgsql/9.3/data"
name: task-pv-storage
subPath: data
readOnly: false
nodeSelector:
kubernetes.io/hostname: k8s-master
最佳答案
根据来自 dockerhub 的 postgres:9.4 官方文档:
1 .请注意:
Warning: the Docker specific variables will only have an effect if you start the container with a data directory that is empty; any pre-existing database will be left untouched on container startup.
PGDATA
环境变量:
This optional variable can be used to define another location - like a subdirectory - for the database files. The default is /var/lib/postgresql/data, but if the data volume you're using is a filesystem mountpoint (like with GCE persistent disks), Postgres initdb recommends a subdirectory (for example /var/lib/postgresql/data/pgdata ) be created to contain the data.
From chart version 4.0.0, it is possible to use this chart with the Docker Official PostgreSQL image. Besides specifying the new Docker repository and tag, it is important to modify the PostgreSQL data directory and volume mount point. Basically, the PostgreSQL data dir cannot be the mount point directly, it has to be a subdirectory.
helm install --name postgres \
--set image.repository=postgres \
--set image.tag=10.6 \
--set postgresqlDataDir=/data/pgdata \
--set persistence.mountPath=/data/ \
stable/postgresql
关于kubernetes - 在本地在 kubernetes 中安装 postgresql 持久卷时面临的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58524072/
我正在安装一个 react-app 并面临一些问题。我试图通过删除 /node-modules 来修复它并重新安装,但它仍然给我一些问题。我是一个 ubuntu 用户。请帮我解决一下这个。这是错误日志
首先,我是 C 的初学者,所以如果我的问题看起来很愚蠢,我很抱歉。 我正在学习如何在 C 中使用冒泡排序算法,我通过以下代码: #include int main() { int ctr,
我正在使用 HtmlUnitDriver 打开链接。这是我的代码: HtmlUnitDriver webDriver = new HtmlUnitDriver(); webDriver.get("so
我是 Camel 新手,我已经为分离器编写了代码。我编写了一个 context.xml,其中包含用于映射 POJO 的路由和 Bean,以及一个 FileSplitter.java 文件,其中包含以下
我不断收到错误:TestException.java:8: 错误: 未报告的异常 Throwable;必须被捕获或宣布被抛出 throw new ParentException().initCause
您能看一下this demo吗?让我知道为什么我无法定位所选 anchor 链接的下一个和上一个 section 的 id? 为了获得下一个,我尝试了所有 var target = $(this).
我正在为我们使用 asp.Net MVC 的应用程序尝试 JqGrid。我无法获得数据显示。我不确定是什么问题。 这是我的查看代码: @{ ViewBag.Title = "Sea
我想将网页显示为模式弹出窗口。 Response.Write("detailedresults=window.showModalDialog('NewFile.aspx','Data','left=(
当我尝试从不同域下载视频时,遇到 CORS 错误。我尝试了很多方法来解决它但无法解决。下面是我的js代码。 getVideoFile = function () { var xhr = new XML
我的 ADF Web 应用程序面临兼容性问题。尝试添加元标记 - ' '甚至尝试注入(inject)java脚本来抑制兼容性问题,但没有任何反射(reflect)。下面是java脚本- ` var
在这个项目中,我遇到了一些运行时错误,我厌倦了通过将错误粘贴到谷歌中来解决它并为此获得适当的结果。但是我无法解决这个问题, 和其他代码很好但是 list 文件显示了一些警告。代码是 `
我实现了一个具有三个选项卡的 TabLayout。当我滑动页面时一切正常,当我只使用标签点击来导航时它也有效。但是,当我滑动页面并单击任何先前选择的选项卡时,问题就出现了,只有选项卡指示器更改为新选项
我想要达到的目标:尝试将数据从我的应用程序字段发送到我在 WebAppServer 上的 Servlet。 我面临 ClassCastException 问题,我尝试实现我在相关讨论中在 StackO
JavaScript 代码: if (document.getElementsByClassName('chkaddress').checked) { $('#DivCommunication
我正在尝试使用 Hazelcast 来使用 SqlPredicate。代码片段: private void testHazelCast() { HazelcastInstance ha
当我从服务器访问图像时,收到 403 禁止错误。 如果我访问音频文件,那么我不会收到任何错误。但如果我正在访问图像文件,那么只有我面临这个问题。 请注意,音频文件的权限是0644,图像的权限也具有相同
我想像sql中的通配符搜索一样执行查询。所以我在nodejs和mongoose中使用正则表达式。当我使用硬代码时它可以工作,但是当我放入变量时它就不起作用。问题出在哪里。 硬代码代码 AlertMod
我正在尝试将 BottomNavigationView 与导航编辑器一起使用。我已经按照给定的方式实现了所有内容,但只显示主页,当我更改选项卡时,它不会更改 fragment 。 这是主要的 Acti
这个问题在这里已经有了答案: Enzyme: simple .to.have not working (1 个回答) 10 个月前关闭。 我有一个组件app.tsx import React, { u
我有多个选项卡(A、B、C),并且在加载“C”选项卡时,模型属性应数据绑定(bind)到选项卡“c”。我面临数据绑定(bind)问题。 三个选项卡(A、B、C)位于另一个 View View A 内。
我是一名优秀的程序员,十分优秀!