【发布时间】:2020-11-06 07:16:55
【问题描述】:
我有一个 EKS 集群,其中有一个将 s3 存储桶安装到所有 pod 的守护进程。
每当出现问题或 pod 重新启动时,挂载卷都无法访问并引发以下错误。
Transport endpoint is not connected
为了解决这个错误,我必须手动卸载卷并重新启动守护程序。
umount /mnt/data-s3-fuse
这个问题的永久解决方案是什么?
我的守护进程文件
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
app: s3-provider
name: s3-provider
namespace: airflow
spec:
template:
metadata:
labels:
app: s3-provider
spec:
containers:
- name: s3fuse
image: image
lifecycle:
preStop:
exec:
command: ["/bin/sh","-c","umount -f /opt/airflow/dags"]
securityContext:
privileged: true
capabilities:
add:
- SYS_ADMIN
# use ALL entries in the config map as environment variables
envFrom:
- configMapRef:
name: s3-config
volumeMounts:
- name: devfuse
mountPath: /dev/fuse
- name: mntdatas3fs
mountPath: /opt/airflow/dags:shared
volumes:
- name: devfuse
hostPath:
path: /dev/fuse
- name: mntdatas3fs
hostPath:
path: /mnt/data-s3-fuse
我的 pod yaml 是
apiVersion: v1
kind: Pod
metadata:
name: test-pd
namespace: airflow
spec:
containers:
- image: nginx
name: s3-test-container
securityContext:
privileged: true
volumeMounts:
- name: mntdatas3fs
mountPath: /opt/airflow/dags:shared
livenessProbe:
exec:
command: ["ls", "/opt/airflow/dags"]
failureThreshold: 3
initialDelaySeconds: 10
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 1
volumes:
- name: mntdatas3fs
hostPath:
path: /mnt/data-s3-fuse
我正在为 s3 kubernetes fuse 使用以下代码。
【问题讨论】:
-
s3fs 正在运行吗? “传输端点未连接”表明它意外退出。通过
-f -d查看调试日志,您可能会有所了解。 -
遇到同样的问题,在跟踪器上打开它:github.com/freegroup/kube-s3/issues/10
标签: amazon-s3 kubernetes amazon-eks s3fs