【发布时间】:2021-05-07 08:53:17
【问题描述】:
我使用 new operator 在 Kubernetes 上部署了 Minio:
helm repo add minio https://operator.min.io/
helm install --namespace minio-operator --create-namespace --generate-name minio/minio-operator
kubectl apply -f https://raw.githubusercontent.com/minio/operator/master/examples/tenant-tiny.yaml
sudo -E kubefwd svc
Port-Forward: 127.1.27.1 minio:80 to pod minio-ss-0-0:9000
Port-Forward: 127.1.27.2 minio-hl:9000 to pod minio-ss-0-0:9000
Port-Forward: 127.1.27.3 minio-ss-0-0.minio-hl:9000 to pod minio-ss-0-0:9000
租户正在工作,我可以通过 minio:80 和 minio-hl:9000 访问 Web 控制台
我想从集群外部访问存储(在 Docker 上运行的 Jupyter notebook);这是我收到错误“ConnectionRefusedError: [Errno 111] Connection denied”的地方:
def main():
client = Minio(
"minio:80", #minio-hl:9000 leads to the same error
access_key="minio",
secret_key="minio123!",
secure=False
)
found = client.bucket_exists("posts")
if not found:
client.make_bucket("posts")
print("Bucket 'posts' created")
else:
print("Bucket 'posts' already exists")
我也尝试使用带有 s3a jar 的 pyspark 来读写对象,但连接挂了很长时间,最后收到类似的错误。
有人可以帮帮我吗?非常感谢!
【问题讨论】:
标签: python kubernetes minio