我试图在Kubernetes工件的部署yaml中添加一个用于挂载configMap的目录。虽然我在容器中定义了卷和mountpath,但在pod exec中,我找不到该目录?
我的部署文件如下所示:
apiVersion: v1
kind: Deployment
metadata:
name: test-deployment
namespace: test
spec:
replicas: 1
template:
metadata:
labels:
app: reactor
spec:
containers:
- name: reactor
image: test/chain
imagePullPolicy: Always
volumeMounts:
- mountPath: /test
name: chaindata
ports:
- containerPort: 3003
volumes:
- configMap:
name: chaindata
defaultMode: 420
name: chaindata
答案 0 :(得分:0)
我发现了我的错误,我实际上指的是我的app目录,但目录已经在根文件夹中创建了。
因此,我已将部署文件中的Mountpath从/ test更改为
src/lib/app/functionchain
感谢您的关注