Minio 官方文档: 使用Docker Compose部署MinIO
Docker Compose允许定义和运行单主机,多容器Docker应用程序。
使用Compose,您可以使用Compose文件来配置MinIO服务。 然后,使用单个命令,您可以通过你的配置创建并启动所有分布式MinIO实例。 分布式MinIO实例将部署在同一主机上的多个容器中。 这是建立基于分布式MinIO的开发,测试和分期环境的好方法。
ARM64 架构部署 Minio
创建 docker-compose.yaml 文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26mkdir /usr/local/minio && cd /usr/local/minio
cat > docker-compose.yaml <<EOF
version: '3.0'
services:
minio:
image: minio/minio:RELEASE.2022-10-15T19-57-03Z
ports:
- "9080:9000"
- "9081:9001"
volumes:
- /data/minio/minio_data:/data
- /data/minio/minio_conf:/root/.minio
environment:
- MINIO_DOMAIN=vonedao-minio
- MINIO_ACCESS_KEY=minio
- MINIO_SECRET_KEY=minio123VoneDAO
- MINIO_PROMETHEUS_AUTH_TYPE=public
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 60s
timeout: 60s
retries: 3
restart: on-failure
EOF拉取镜像
1
docker-compose pull
启动服务
1
docker-compose up -d
配置 ingress 代理 minio web
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54cat > minio-ingress.yaml <<EOF
apiVersion: v1
kind: Service
metadata:
labels:
app: minio
name: minio
namespace: publics
spec:
ports:
- port: 80
name: http
protocol: TCP
targetPort: 9081
type: ClusterIP
---
apiVersion: v1
kind: Endpoints
metadata:
labels:
app: minio
name: minio
namespace: publics
subsets:
- addresses:
- ip: 192.168.0.9
ports:
- name: http
port: 9081
protocol: TCP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: minio
namespace: publics
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 20m
spec:
ingressClassName: nginx
rules:
- host: minio.vonebaas.com
http:
paths:
- backend:
service:
name: minio
port:
number: 80
path: /
pathType: ImplementationSpecific
EOF
$ kubectl create -f minio-ingress.yaml