Kubernetes中的Minio部署:控制台重定向

发布于 2025-02-11 03:58:52 字数 280 浏览 1 评论 0原文

我使用yaml文件在我的2个节点kubernetes群集中进行了Minio部署。

我已经使用了NFS服务器来与相同的相应持续卷和PVC相同的PVC。
POD运行后,我创建了一个服务来从浏览器访问控制台。

但是,当尝试URL “ http://< host-ip-address:nodeport>“> host-ip-address:nodeport> > 时,也将其重定向到端口45893,并带有“无法达到此站点”。

问候, Vivek

I made a Minio deployment in my 2 Node Kubernetes cluster using YAML files.

I had used an NFS server for the corresponding persistent volume and pvc associated with the same.
Once the pod is running, I created a service to access the console from the browser.

But when tried the URL "http://<host-ip-address:nodePort>", the same was getting redirected to the port 45893 with the message "This site cannot be reached."

Regards,
Vivek

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

云仙小弟 2025-02-18 03:58:52

Minio有2个端口,:9000用于API端口和:9001(或控制台端口的随机端口) - 仪表板。当通过浏览器访问API端口时,它将重定向到:9001

当端口9000用于连接到API时,Minio
自动重定向浏览器访问Minio控制台。
https://min.io/docs/minio/minio/minio/linux/linux/index.html

要解决此问题,我将Minio端口定义为与NodePort相同。

minio-depl.yaml

  args:
    - server
    - /data
    - --address
    - ":30009"
    - --console-address
    - ":31009"

minio-api-svc.yaml

  ports:
    - name: api
      port: 30009
      nodePort: 30009
      protocol: TCP

minio-console-svc.yaml

  ports:
    - name: console
      port: 31009
      nodePort: 31009
      protocol: TCP

MinIO have 2 ports,:9000 for API port and :9001 (or random port) for console port--the dashboard. when access to the API port via browser, it will redirect to :9001.

While the port 9000 is used for connecting to the API, MinIO
automatically redirects browser access to the MinIO Console.
https://min.io/docs/minio/linux/index.html

To fix this problem, I define the MinIO ports to the same as nodePort.

minio-depl.yaml

  args:
    - server
    - /data
    - --address
    - ":30009"
    - --console-address
    - ":31009"

minio-api-svc.yaml

  ports:
    - name: api
      port: 30009
      nodePort: 30009
      protocol: TCP

minio-console-svc.yaml

  ports:
    - name: console
      port: 31009
      nodePort: 31009
      protocol: TCP
红颜悴 2025-02-18 03:58:52

经过多次尝试,在我的朋友的帮助下找到了解决方案。

我们创建了一份服务的副本,并将端口更改为我的Minio控制台被重定向到的端口,并将端口置于防火墙中允许的某些随机端口。这解决了问题。

service.yaml

type: LoadBalancer
ports:
  - port: 9000
    nodePort: 32767
    protocol: TCP
selector:

service_copy.yaml

ports:
  - port: 45893
    nodePort: 32766
    protocol: TCP
selector:
$ kubectl get svc
NAME                    TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)           AGE
kubernetes              ClusterIP   X.X.X.X        <none>        443/TCP           25d
minio-xxx-service       NodePort    X.X.X.X        <none>        9000:32767/TCP    3d23h
minio-xxxx-service-cp   NodePort    X.X.X.X        <none>        45893:32766/TCP   146m

执行此操作后,我能够访问控制台。

问候,
Vivek

After many tries, got a solution with the help of my friend.

We created a copy of the service and changed the Port to the port to which my Minio console was getting redirected and Nodeport to some random port allowed in the firewall. This resolved the issue.

service.yaml

type: LoadBalancer
ports:
  - port: 9000
    nodePort: 32767
    protocol: TCP
selector:

service_copy.yaml

ports:
  - port: 45893
    nodePort: 32766
    protocol: TCP
selector:
$ kubectl get svc
NAME                    TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)           AGE
kubernetes              ClusterIP   X.X.X.X        <none>        443/TCP           25d
minio-xxx-service       NodePort    X.X.X.X        <none>        9000:32767/TCP    3d23h
minio-xxxx-service-cp   NodePort    X.X.X.X        <none>        45893:32766/TCP   146m

After doing the same, I was able to access the console.

Regards,
Vivek

冷血 2025-02-18 03:58:52

添加此行:minio_opts =“ - certs-dir/home/swaggmode/.minio/certs -console-address:9001”到位于/etc/etc/eetc/default/default/default/default/ Minio应使Minio控制台重定向到端口9001或您想要的任何特定端口。

Adding this line: MINIO_OPTS="--certs-dir /home/swaggmode/.minio/certs --console-address :9001" to the config file located at /etc/default/minio should make minio console to redirect to port 9001 or any specific port you want.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文