二进制部署k8s集群v1.23.9版本-17-安装minio

17.1、准备minio镜像

192.168.1.200操作
docker pull minio/minio:latest
docker images|grep minio
docker tag e31e0721a96b harbor.qgutech.com/middleware/minio:latest
docker push harbor.qgutech.com/middleware/minio:latest

17.2、准备资源配置清单

mkdir -p /data/k8s-yaml/minio
cd /data/k8s-yaml/minio
vim dp.yaml
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
name: minio
name: minio
namespace: middleware
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 7
selector:
matchLabels:
name: minio
template:
metadata:
labels:
app: minio
name: minio
spec:
containers:
- name: minio
image: harbor.qgutech.com/middleware/minio:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9000
hostPort: 59900
protocol: TCP
args:
- server
# 2021最新版需要添加,之前不需要
- "--console-address"
- ":9001"
- /data
env:
- name: MINIO_ACCESS_KEY
value: admin
- name: MINIO_SECRET_KEY
value: minio@qixiao123.com
readinessProbe:
failureThreshold: 3
httpGet:
path: /minio/health/ready
port: 9000
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
volumeMounts:
- mountPath: /data
name: data
imagePullSecrets:
- name: harbor
volumes:
- nfs:
server: hfqg1-200
path: /data/nfs-volume/minio
name: data

vim svc.yaml
apiVersion: v1
kind: Service
metadata:
name: minio
namespace: middleware
spec:
ports:
- name: api
port: 59900
targetPort: 9000
protocol: TCP
- name: consle
port: 59901
targetPort: 9001
protocol: TCP
selector:
app: minio

vim ingress.yaml
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: minio
namespace: middleware
spec:
rules:
- host: minio.qgutech.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: minio
port:
number: 59901
- host: minio-api.qgutech.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: minio
port:
number: 59900

17.3、内网域名解析

192.168.1.197操作
添加两条解析记录,注意序列号前滚
minio A 192.168.1.196
minio-api A 192.168.1.196

systemctl restart named
dig -t A minio.qgutech.com @192.168.1.197 +short
dig -t A minio-api.qgutech.com @192.168.1.197 +short

17.4、创建名称空间

192.168.1.201操作
kubectl create ns middleware
kubectl create secret docker-registry harbor --docker-server=harbor.qgutech.com --docker-username=admin --docker-password=1qaz2wsx#EDC -n middleware

17.5、创建存储路径

192.168.1.200操作
mkdir -p /data/nfs-volume/minio/

17.6、应用资源配置清单

192.168.1.201操作
kubectl apply -f http://k8s-yaml.qgutech.com/minio/dp.yaml
kubectl apply -f http://k8s-yaml.qgutech.com/minio/svc.yaml
kubectl apply -f http://k8s-yaml.qgutech.com/minio/ingress.yaml
kubectl get svc,pods -n middleware
kubectl get svc,pods -n middleware -o wide

17.7、界面访问

http://minio.qgutech.com/
用户名:admin
密码:minio@qixiao123.com
至此,minio安装完成,谢谢观看。

posted @ 2022-09-06 09:16  霸都运维  阅读(405)  评论(0编辑  收藏  举报