写pod的yaml文件时,如果想使用云存储,则volumeMounts这个property,
mountPath 为container内部目录
而subPath 虽然紧跟mountpath, 最容易被误解为本地路径,其实其为远端云存储上的子路径

所以进入pod内部看磁盘情况,显示
bbuser@stream-notifications-baseline-learn-tomcat-7cd697-2xwp7:~$ df -v
Filesystem 1K-blocks Used Available Use% Mounted on
10.114.70.2:/learn_perf_bbcontent_1/instance/stream-notifications-baseline
570422592 19338048 551084544 4% /mnt/bbcontent
- name: learn image: ${LEARN_DOCKER_IMAGE} imagePullPolicy: IfNotPresent
resources: requests: cpu: ${LEARN_CPU_REQUEST} memory: ${LEARN_MEM_REQUEST}
limits: cpu: ${LEARN_CPU_LIMITS} memory: ${LEARN_MEM_LIMITS} command: -
${BB_USER_HOME}/bin/launcher.sh env: - name: DEV_FEATURES valueFrom:
configMapKeyRef: name: ${INSTANCE_NAME}-learn-config key: DEV_FEATURES
volumeMounts: - name: bbcontent **mountPath: /mnt/bbcontent subPath:
instance/${INSTANCE_NAME} ** volumes: - name: bbcontent persistentVolumeClaim:
claimName: learn-deployments-share
volume 和name(container的名字)是统一层级。

技术
©2020 ioDraw All rights reserved
自制整人电脑小程序华为鸿蒙系统学习笔记9-开发者生态建设PHP调用shell命令比特币突破8000美元 背后暗藏杀机使用函数实现两个数的交换(C语言)log4j打印异常堆栈信息的方法少儿编程孩子的学习路线分享一场黑客帝国代码雨脚本,简单好玩!三分钟看懂神经网络机器翻译 疫情过后 学哪个编程有前景