找到这个例子Kubernetes EmptyDir量Kubernetes卷安装与复制控制器
apiVersion: v1
kind: Pod
metadata:
name: www
spec:
containers:
- name: nginx
image: nginx
volumeMounts:
- mountPath: /srv/www
name: www-data
readOnly: true
- name: git-monitor
image: kubernetes/git-monitor
env:
- name: GIT_REPO
value: http://github.com/some/repo.git
volumeMounts:
- mountPath: /data
name: www-data
volumes:
- name: www-data
emptyDir: {}
我想第2个之间的豆荚安装。我正在使用2个不同的复制控制器创建这些Pod。复制控制器看起来像这样
复制控制器1:
apiVersion: v1
kind: ReplicationController
metadata:
name: node-worker
labels:
name: node-worker
spec:
replicas: 1
selector:
name: node-worker
template:
metadata:
labels:
name: node-worker
spec:
containers:
-
name: node-worker
image: image/node-worker
volumeMounts:
- mountPath: /mnt/test
name: deployment-volume
volumes:
- name: deployment-volume
emptyDir: {}
复制控制器2:
apiVersion: v1
kind: ReplicationController
metadata:
name: node-manager
labels:
name: node-manager
spec:
replicas: 1
selector:
name: node-manager
template:
metadata:
labels:
name: node-manager
spec:
containers:
-
name: node-manager
image: image/node-manager
volumeMounts:
- mountPath: /mnt/test
name: deployment-volume
volumes:
- name: deployment-volume
emptyDir: {}
能Kubernetes emptyDir量用于这个场景?
我正在尝试NFS的例子。我已经建立了NFS服务器,pv和pvc,并且在尝试卷到NFS时,我在日志中看到了这个错误。 。 输出:mount.nfs:请求不支持NFS版本或传输协议 – VizZy
VizZy,听起来像nfs客户端和服务器之间可能不匹配。服务器的版本是什么? –