修改Minio文档

This commit is contained in:
2025-12-25 15:19:16 +08:00
parent c33e9109e0
commit d975566e4b
4 changed files with 126 additions and 82 deletions

View File

@@ -87,47 +87,22 @@
helm install --namespace minio minio minio/minio -f minio-values.yaml
```
6. 部署 Nginx 代理
6. 下载 Nginx 配置文件
```bash
vi default.conf
```
内容如下
```nginx
server {
listen 9000 ssl;
server_name localhost; # 这里替换自己的域名
client_max_body_size 1024m; # 限制上传文件大小
ssl_certificate /etc/nginx/conf.d/cert/tls.crt;
ssl_certificate_key /etc/nginx/conf.d/cert/tls.key;
location / {
proxy_set_header X-FORWARDED-FOR $remote_addr;
proxy_set_header X-FORWARDED-PROTO $scheme;
proxy_set_header Host $http_host;
proxy_pass http://minio:9000;
}
}
wget https://gitee.com/offends/Kubernetes/raw/main/File/Conf/minio-nginx-default.conf
```
7. 编辑 Dockerfile
```bash
vi Dockerfile
```
内容如下
```dockerfile
cat > Dockerfile <<EOF
FROM nginx:alpine-slim
COPY ./default.conf /etc/nginx/conf.d/default.conf
COPY ./minio-nginx-default.conf /etc/nginx/conf.d/default.conf
EXPOSE 9000
EOF
```
8. 构建镜像
@@ -142,62 +117,13 @@
kubectl get svc -n minio | grep 9000 | awk '{print $3}'
```
10. 编辑 Yaml
10. 下载 Yaml
```bash
vi minio-gateway.yaml
wget https://gitee.com/offends/Kubernetes/raw/main/File/Yaml/minio-gateway.yaml
```
内容如下
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: minio
name: minio-gateway
labels:
app: minio-gateway
spec:
selector:
matchLabels:
app: minio-gateway
template:
metadata:
labels:
app: minio-gateway
spec:
hostNetwork: true
hostAliases:
- ip: "" #填入 Minio SVC IP
hostnames:
- "minio"
containers:
- name: minio-gateway
image: minio-gateway:v1.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9000
protocol: TCP
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 3
successThreshold: 1
tcpSocket:
port: 9000
timeoutSeconds: 10
resources:
limits:
memory: 128Mi
volumeMounts:
- name: ssl
mountPath: "/etc/nginx/conf.d/cert/"
volumes:
- name: ssl
secret:
secretName: minio-ssl
```
**修改** `hostAliases` 参数
11. 部署