我做了这些设置:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
name: mongo-claim0
name: mongo-claim0
namespace: my-app
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}
apiVersion: v1
kind: ReplicationController
metadata:
labels:
name: mongo
name: mongo-controller
namespace: my-app
spec:
replicas: 1
template:
metadata:
labels:
name: mongo
spec:
containers:
- image: mongo
name: mongo
ports:
- name: mongo
containerPort: 27017
volumeMounts:
- mountPath: /data/db
name: mongo-claim0
restartPolicy: Always
volumes:
- name: mongo-claim0
persistentVolumeClaim:
claimName: mongo-claim0
apiVersion: v1
kind: Service
metadata:
name: mongo
namespace: my-app
labels:
name: mongo
spec:
ports:
- port: 27017
targetPort: 27017
selector:
name: mongo
当我尝试缩放此广告连播时,Minikube UI会显示:
mongo-controller-xr21r - >等待:CrashLoopBackOff 退回重启失败的容器错误同步窗口
我在新吊舱上收到错误:
initAndListen中的异常:98无法锁定文件: /data/db/mongod.lock资源暂时不可用
你能帮助我扩展持久存储的pod吗?